

Base 10 | Base 58
0 | 1
1 | 2
10 | A
20 | L
30 | W
53 | u
The first line of the input contains ‘T’ denoting the number of test cases.
The first and the only line of each test case contains an integer N.
For each test case, print a single line containing a single integer denoting the number in the base 58.
The output of each test case will be printed in a separate line.
You do not need to input or print anything, as it has already been taken care of. Just implement the given function.
1 <= T <= 50
0 <= N <= 10 ^ 4
Time limit: 1 sec.
You can represent the integers as powers of 58 and then convert them using the above mapping.
Eg: 4364 = 1 * (58 ^ 2)+ 17 * (58 ^ 1) + 14 * (58 ^ 0)
1 in base 10 = 2 in base 58, 17 in base 10 = 2 in base J, 14 in base 10 = 2 in base F
Therefore the answer will be: 2JF
Algorithm:
Pair Product Div by K
Pair Product Div by K
Merge Two Sorted Arrays Without Extra Space
Merge Two Sorted Arrays Without Extra Space
Co-Prime
First Digit One
Special Digit Numbers