Number systems#1008

Number systems

1 second
64 megabytes
Easy

Given a nonnegative integer in the -th base numeral system, output this number in the -th base numeral system.

Input

The first line contains two integers and (2 \leq m, k \leq 36), given in decimal notation. The second line contains the number in base .

To represent digits with values to , use uppercase Latin letters to , respectively. The number of digits in the given number does not exceed .

Output

Output the required number in base without leading zeros.

Examples

Example 1

Loading
Loading