Third qualification round completed

Tasks

Show one task per page / all tasks on one page

"A" Spreadsheets
Time limit 1 second
Memory limit 256 megabytes

Petya is developing his own spreadsheet editor. His editor will use the following naiming for columns: the first 26 columns will be named by the letters of the alphabet: A, B, C, ..., Z. The following columns, starting from column 27, will be named using pairs of letters: AA, AB, ..., AZ, BA, BB, ..., BZ, ..., ZZ. Then triples of letters will be used: AAA, AAB, AAC, ..., then strings of four letters, and so on.

Now Petya needs to get the name of the column by its number. Help him to create the corresponding piece of code.

Input format

Input data contains several test cases. The first line of input contains an integer t — the number of test cases (1 ≤ t ≤ 1000).

The following t lines contain one integer k each (1 ≤ k ≤ 109).

Output format

For each test case output the name of the k-th column in the spreadsheet editor.

Examples
Input data
4
1
10
100
1000
Output data
A
J
CV
ALL
 

Send solution

Upload Maximal size is 256kb

Log in

VK Facebook

Forgot password?

Registration

The instruction for password recovery
has been sent to your email