提示: 欢迎访问OurACM平台。
Problem 1616 Hero's string

Accept: 54    Submit: 216
Time Limit: 1000 mSec    Memory Limit : 32768 KB

Problem Description

The hero is so cute that he can create everything even the string.

A long string which is named as “perfectstring” can be generated from the code:

Because the perfectstring is too long, the hero can not get the character in the n-th position. Can you help him?

Input

There are multiple tests, the number of test case will not exceed 20000. For each test, the first line is a positive integer n(1≤n≤1016), denoting the query position.

Output

For each test, output the character in the n-th position of the “perfectstring” string.

Sample Input

1 12

Sample Output

1 g

Source

FOJ月赛-2008年6月 -- Heroes Happen Here

Submit  Back  Status  Discuss