LearnPy Hub
← Arena
EasyRating 1000

Change of Base

Convert a number from base b1 to base b2 (2 ≤ b ≤ 36, digits 0–9 then A–Z).

Input

One line: number b1 b2.

Output

The number in base b2.

Sample 1

Input
255 10 16
Output
FF

Sample 2

Input
FF 16 2
Output
11111111
solution.py
Output appears here
Change of Base · Python Arena problem · LearnPy Hub