171. Nearest Palindromes
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

A number is called a palindrome if it reads the same forwards and backwards. For example, 5775, 98389, 7, and 66 are palindromes, but 552, 35, and 86867 are not palindromes.

Given a number $$$n$$$, figure out the closest $$$k$$$ palindromes to $$$n$$$. If two palindromes have the same distance away from $$$n$$$, print the smaller one first.

For example, let's say $$$n$$$ = 600 and $$$k$$$ = 4.

The closest palindrome to $$$n$$$ is 595, with a distance of 5. The next closest palindrome is 606, with a distance of 6. The next two are 585 (distance of 15) and 616 (distance of 16), so we would print 595, 606, 585, and 616, in that order.

Input

The only line of input consists of two space-separated integers $$$n$$$ and $$$k$$$: the number to check palindromes near, and the number of palindromes to print out, respectively.

Output

Output $$$k$$$ lines, each consisting of a palindrome, sorted by their distance from $$$n$$$ (calculated as abs($$$n$$$ - $$$p$$$) for a palindrome $$$p$$$).

The palindromes must be positive integers.

Examples
Input
600 4
Output
595
606
585
616
Input
753 8
Output
757
747
767
737
777
727
787
717
Input
6 10
Output
6
5
7
4
8
3
9
2
1
11