FAMILYP  Family Problems
Asif and Nafisa are very interested in solving puzzles.They always try to give one another puzzles to see who is the best.So ,as usual, one day, Nafisa gave Asif a matrix.
The matrix is as follows
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z A B C ......
B C D E F G H I J K L M N O P Q R S T U V W X Y Z A B C D ......
C D E F G H I J K L M N O P Q R S T U V W X Y Z A B C D E ......
D E F G H I J K L M N O P Q R S T U V W X Y Z A B C D E F .......
.........................................................................................
.
.
Assume that the matrix is very huge(both row and column wise). Nafisa describes a special sequence as a sequence whose first term is 'A'[element at (0,0)], second term is 'B'[element at (0,1)],third term is 'B'[element at (1,0)],fourth term is 'C'[element at (2,0)]. Now,she asks Asif to find the nth term of this special sequence. Help Asif To solve the problem.
Input
There will be multiple test cases with number N(1<=N<=1000000) per line.
Output
A character ['A''Z'] per line for each number N representing the Nth number in the special sequence.
Example
Input:
3
6
10
Output: TERM 3 IS B
TERM 6 IS C
TERM 10 IS D
hide comments
Mohamed Ramzy:
20100419 01:48:29
Yes, "Don't" take input until EOF ,


Smithers:
20100103 02:31:56
Just in case people aren't sure, output is as in the example, *not* the output description. 

Drew Saltarelli:
20091209 18:23:48
Hemant I'm beginning to lose faith in you... please change the EOF condition 

Karim:
20091203 19:11:41
input ends when string length is equal to 0 not until end of file.. Really smart guy who designed this sort of input end..Bravo 

Karim:
20091203 18:49:55
when shall i stop taking input?? 

Vaibhav Pandey:
20091124 10:32:32
1A 2B 3B 4C 5C 6C 7D 8D 9D 10D 11E 12E... 

Hemant Verma:
20091121 11:31:25
Take Input until End of File 
Added by:  Hemant Verma 
Date:  20091114 
Time limit:  1s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 NODEJS OBJC PERL6 SQLITE VB.NET 
Resource:  Alkhwarizm 2009 