

A de Bruijn cycle of order for the set D = \{0, 1, \ldots, b - 1\} is a cyclic sequence a_0, a_1, \ldots, a_{l - 1} such that every possible vector of length over the set appears exactly once in this sequence. That is, for every sequence b_0, b_1, \ldots, b_{n - 1} from , there exists a unique in the range 0 \leq k < l such that b_j = a_{(k + j) \bmod l} for all . Your task is to construct such a sequence.
Constraints
and are integers, 1 \leq n \leq 1000, 1 \leq b \leq 10, b^n \leq 10^4.
The input consists of a single line containing the numbers and .
Output the de Bruijn cycle of order for the set of -ary digits as a single line, without spaces.
Example 1