#00006E

proizvod2

Merchant Joca uses a system of multiplicative prices in his shop. In other words, for each item there's a basic price and Merchant Joca's tax. The buyer must pay the price equal to their product.

Merchant Joca is currently taking inventory and is setting new prices. For one item he has a specific number of plastic digits for displaying the price of that item on a sign. With those plastic digits he wants to set the base price and tax for the item so that the buyer must pay the maximum price. Since he does all his calculations on paper, he has asked you to find the last digits of that maximum price so that he can check the validity of his calculations. A base price and tax must each contain at least one digit.



InputThe first line of the standard input contains two natural numbers N and M separated by a blank space (2 < N < 10^5 , 1 < M < 8). N represents the number of plastic digits for the item, and M represents the number of last digits of the maximum price that Merchant Joca wishes to know. In the second row there are N digits that represent the
plastic digits. Before and between the digits in the second row there are no blank spaces.


OutputTo the first and only line of standard output write the last M digits of the maximum price for the item that can be obtained by using the given plastic digits. If the number of digits in the maximum price is less than M, then enter the price preceded with zeros so that the total number of digits in the output is M. There should be no blank spaces before and between digits.


Input:
4 2
2397

Output:
16
Explanation:
The maximum price can be made with the basic price of 92 and Joca's tax of 73 (or vice versa). Then the maximum price is 6716, but only the last two digits are shown in the output, ie. 16.

Input:
3 3
501

Output:
050
Explanation:
The maximum price can be made with the basic price 5 and Joca's tax of 10 (or vice versa) or if the basic price is 50 and the tax is 1 (or vice versa). Then the maximum price is 50, but it's shown in the output as the full price with one leading zero, i.e. 050.

Submit solution

Coming later

The grading service will be connected in a later migration step. You can inspect the task and your previous results now.