Given two integers n and k, list every combination of k distinct numbers chosen from 1, 2, …, n. A combination is an unordered selection, so each is written with its numbers in ascending order.
To make the answer unique, print the combinations in lexicographic order (compare them as ascending integer lists, left to right).
Input format
A single line with two space-separated integers n and k.
Output format
Line 1: an integer M, the number of combinations (which equals C(n, k)).
The next M lines: one combination per line, its k numbers space-separated in ascending order. When k = 0 there is exactly one combination, the empty one, printed as an empty line.
Constraints
- 0 ≤ n ≤ 18
- 0 ≤ k ≤ n