#P287. 【例47.2】 转进制

【例47.2】 转进制

Description

Convert a decimal number XX to any base MM (M16M≤16) using a recursive algorithm.

Input Format

One line containing two numbers: the first is the decimal number XX, and the second is the target base MM.

Output Format

Output the converted number.

Sample

31 16
1F