Combinatorial mathematics

Time Limit: 1000 ms Memory Limit: 65536 KiB

Problem Description

As you know, shadow95 is pretty good at maths, especially combinatorial mathematics. Now, he has made a problem for you. We call a subset which exactly has r elements as a "r-subset".For example, {1,2,5} is a 3-subset(r=3) of {1,2,3,4,5}. Now, your task is to form all the r-subset of {1,2,...,n}, then output them in lexicographic order(字典序).

Input

 The input file ends by EOF.
For each test case, there are two integer n,r.(1 <= r < n <= 20)

Output

 First output the case number, then output all the r-subset of {1,2,...,n} in lexicographic order.
Each case seperates by a blank line.

Sample Input

3 2
3 1

Sample Output

Case #1:
1 2
1 3
2 3

Case #2:
1
2
3

Hint

 

Source

HDU shadow95