Score : $300$ points
Print all strictly increasing integer sequences of length $N$ where all elements are between $1$ and $M$ (inclusive), in lexicographically ascending order.
For two integer sequences of the same length $A_1,A_2,\dots,A_N$ and $B_1,B_2,\dots,B_N$, $A$ is said to be lexicographically earlier than $B$ if and only if:
An integer sequence $A_1,A_2,\dots,A_N$ is said to be strictly increasing if and only if:
Input is given from Standard Input in the following format:
$N$ $M$
Print the sought sequences in lexicographically ascending order, each in its own line (see Sample Outputs).
2 3
1 2 1 3 2 3
The sought sequences are $(1,2),(1,3),(2,3)$, which should be printed in lexicographically ascending order.
3 5
1 2 3 1 2 4 1 2 5 1 3 4 1 3 5 1 4 5 2 3 4 2 3 5 2 4 5 3 4 5