#99. Base62

Base62

题目描述

As we already know, base64 is a common binary-to-text encoding scheme. Here we define a special series of positional systems that represent numbers using a base (a.k.a. radix) of 22 to 6262. The symbols 00 -- 99 represent zero to nine, and AA -- ZZ represent ten to thirty-five, and aa -- zz represent thirty-six to sixty-one. Now you need to convert some integer zz in base xx into base yy.

输入格式

The input contains three integers xx,yy(2x,y62)(2≤x,y≤62) and z(0z<x120)z(0≤z<x^{120}), where the integer zz is given in base xx.

输出格式

Output the integer zz in base yy.

样例

16 2 FB
11111011