#P1268A. Long Beautiful Integer
Long Beautiful Integer
Description
You are given an integer of digits , which make up its decimal notation in order from left to right.
Also, you are given a positive integer .
Let's call integer beautiful if for each , such that .
You need to find the smallest beautiful integer , such that .
The first line of input contains two integers (): the number of digits in and .
The next line of input contains digits (, ): digits of .
In the first line print one integer : the number of digits in .
In the next line print digits (, ): digits of .
Input
The first line of input contains two integers (): the number of digits in and .
The next line of input contains digits (, ): digits of .
Output
In the first line print one integer : the number of digits in .
In the next line print digits (, ): digits of .