Write a program to convert numbers from one base to another.
- The first line of the input contains the number of test cases that follow.
- Each test case consists of one line, which contains three space separated numbers.
- The first (decimal) number is the base in which the second number is being provided.
- The third (decimal) number is the base to which you need to translate the second number.
- In order to represent values beyond the digit 9, you may use the letters of the alphabet, capital A to Z.
- Both the original and final bases (the first and third numbers of each testcase) will be in the range 2 to 36 inclusive.
- The actual number to be translated will have a decimal value less than 1,000,000,000.
2 10101 10
10 511 16
36 HACKY 7
Problem Setter: Kaustubh Karkare