For the given natural numbers and (2 \le k \le 10), your task is to generate and print all sequences of length using the characters 0, \ldots, k-1, in lexicographical order.
The input consists of two numbers: and .
Print each sequence on a separate line. Ensure that each sequence ends with a newline character, and the numbers within each sequence are separated by a single space.
Example 1