Number systems
Easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
Given a nonnegative integer in the m-th system of calculation. Need to bring this number in the k-th system of calculation.
Input
The input file in the first line contains two numbers m and k (in decimal), the second line - the number for the transfer. 2 ≤ m, k ≤ 36, for submission to the number 10...35 use capital letters A...Z, respectively, the number of bits of the initial number does not exceed 1000.
Output
Bring in the output file the required number without leading zeros.
Examples
Input #1
Answer #1
Submissions 3K
Acceptance rate 23%