#C1778. Generate Lock Combinations

    ID: 45020 Type: Default 1000ms 256MiB

Generate Lock Combinations

Generate Lock Combinations

You are given a positive integer N. Your task is to generate the first N valid lock combinations in lexicographical order. A valid lock combination is defined as a strictly increasing sequence of digits chosen from the set ({1, 2, \ldots, 9}) with a length between 2 and 5 inclusive. The combinations are generated by considering all 2-digit combinations first, then 3-digit, and so on, until you have produced exactly N combinations.

inputFormat

The input consists of a single integer N, provided through standard input (stdin), which represents the number of lock combinations you need to generate.

outputFormat

Output N valid lock combinations, each on a separate line, to standard output (stdout). The combinations must be printed in lexicographical order as described in the problem.## sample

5
12

13 14 15 16

</p>