Number System - 2
Write a program that converts a number from one numeral system to another. The program should take three inputs: n, A, and k. Here, n and k are natural numbers ranging from 2 to 36, representing the bases of the numeral systems. A is a number expressed in the numeral system with base n, where 0 < A < 2^31.
The task is to output the value of A in the numeral system with base k, ensuring there are no leading zeros. The digits are represented by the symbols: '0', '1', '2', ..., '9', 'A', 'B', 'C', ..., 'Z'.
Input
The input file consists of 3 lines: The first line contains the number n, where 2 ≤ n ≤ 36. The second line contains the number A, which is written in the numeral system with base n, and satisfies 0 < A < 2^31. The third line contains the number k, where 2 ≤ k ≤ 36.
Output
Output the number expressed in the numeral system with base k.