Consider the following bijection between words from the alphabet
f: {a,b}* -> N
e -> 0 (empty word)
a -> 1
b -> 2
aa -> 3
ba -> 4
ab -> 5
bb -> 6
aaa -> 7
baa -> 8
Your task is to write a program that can transform words from alphabet
Input
The input consists of a sequence of lines and each line can either be
a word from the alphabet or an integer. It is guaranteed that the
given integer corresponds to a word of maximum size less than 30.
All the words in the input are non-empty and the integers are greater
than zero.
Output
For each line of input, a word or an integer, you should output also
in separate lines the corresponding integer or word according to the
mapping defined above.
Sample Input
b 5 aaa 18
2 ab 7 bbaa