Base Conversion 2

No attempts yetTime limit0.5sMemory limit256 MB

Problem

A number NN written in base 10 is given. Write a program that converts it to base BB and prints the result.

In a base above 10, some digits cannot be written with the characters 0 to 9. Those digits use uppercase letters. A is 10, B is 11, and in the same way F is 15, Y is 34, and Z is 35.

Input

The first line contains NN and BB, separated by a space. NN is a natural number no greater than one billion, and BB is an integer with 2B362 \le B \le 36.

Output

Print NN written in base BB on the first line. Write digits above 9 as uppercase letters, and do not add leading zeros.