eolymp
bolt
Try our new interface for solving problems
Problems

Trolling

Trolling

In the language of the trolls have \textbf{5} consonants: \{\textbf{h}, \textbf{k}, \textbf{m}, \textbf{r}, \textbf{t}\}, and \textbf{3} vowels: \{\textbf{a}, \textbf{o}, \textbf{u}\}. Each word begins with a consonant letters, with the word can not be two consecutive vowels or consonants. \textbf{N} trolls in turn called the shortest word that has not called any of the previous trolls. If several options, the troll vibiraem smallest lexicographically. Lexicographic order \textbf{h} < \textbf{k} < \textbf{m} < \textbf{r} < \textbf{t} < \textbf{a} < \textbf{o} < \textbf{u}. In this case, the word is compared first by the first letter. If the first letter of the same, for the second, etc. Find the word that will call \textbf{N}-th troll. \InputFile The first line contains a single number \textbf{1} ≤ \textbf{T} ≤ \textbf{100}, the number of test cases. Each and subsequent \textbf{T} lines contains one integer \textbf{1} ≤ \textbf{N} ≤ \textbf{1000000000}(\textbf{1e9}) -- the number of Troll. \OutputFile For each number \textbf{N} of input data, output in a single line answer to the problem in accordance with the format specified in the example.
Time limit 1 second
Memory limit 64 MiB
Input example #1
3
6
95
13934
Output example #1
Case #1: ha
Case #2: tut
Case #3: muhomor
Source The 2012 All-Ukrainian Collegiate Programming Contest Round I Training Contest 19 April 2012