TNVFC1L - Letters

We build the infinite sequence of uppercase letters (A-Z) which starts with single-letter strings (A, B, ..., Z), continues with two-letter strings (AA, AB, ..., AZ, BA, BB, ..., BZ, ..., ZZ), then three letter strings and so on. The same-length strings are ordered lexicographically. We are interested in finding which letter sits at a given index in the sequence.

Input

The letter index, ranging between 0 and 2*10^9.

Output

The letter at the specified index.

Example

Input:

0
25
50
100
250
500
1000

Output:

A
Z
A
B
E
J
S

Added by:BIDV
Date:2017-09-22
Time limit:0.300s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All

hide comments
2017-09-26 19:36:23 :D
Alternatively a judge can be changed to binary.
2017-09-23 06:23:55 [Rampage] Blue.Mary
This should be put into "partial" section, because it doesn't use binary judge.
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.