Ilya has recently taken up archaeology. He's recently found two numbers, written in the
m-ba
sed notation. Each of the found numbers consisted of exactly n digits. Ilya immediately started looking for information about those numbers. He learned that the numbers are part of a cyphered code and the one who can decypher it can get the greatest treasure.
After considerable research Ilya understood that to decypher the code, he should do the following:
-
Rearrange digits in the first number in some manner. Similarly, rearrange digits in the second number in some manner. As a result of this operation, the numbers can get leading zeroes.
-
Add numbers, digit by digit, modulo m. In other words, we need to get the third number of length n, each digit of the number is the sum of the respective numbers of the found numbers. For example, suppose there are two numbers recorded in the ternary notation, 001210 and 012111, then if you add them to each other digit by digit modulo 3, you will get number 010021.
-
The key to the code is the maximum possible number that can be obtained in the previous step.
Help Ilya, find the key to the code.
Output
Print
n m-ba
se digits. The resulting third number written in the m-based notation. Print the digits in the order from the most significant digits to the least significant ones.