Number system#7433

Number system

1 second
64 megabytes
Very easy

You are given a number and a base for a numeral system, both expressed in decimal form. Your task is to convert the number into its representation in the base numeral system.

Input

The first line contains the decimal representation of the number , which can be up to characters long. The second line contains the decimal representation of the base , also up to characters long.

Output

Provide the representation of the number in the base numeral system. If a digit in this system is between and , print the digit directly. If the digit is greater than , enclose its decimal representation in square brackets (as shown in the example).

Examples

Example 1

Loading
Loading