Good at arranging James time limit: 1000 MS | memory limit: 65535 kb difficulty: 4
-
Description
-
James is very clever and very good at arranging computing. For example, if you want to give a small number 5, he can immediately give a full array of numbers from 1 to 5 in the lexicographically ordered order. If you want to embarrass him, select a few numbers from these five numbers to keep him in full order, then you are wrong. He is also very good at it. Now you need to write a program to verify whether James is good at sorting.
-
Input
-
The number of groups of test data in the first line is represented by an integer N (1 <n <10,
The first line of each group of test data is two integers n m (1 <n <9, 0 <m <= N)
-
Output
-
In 1-N, select M characters for full sorting, and output all data in lexicographically. Each sort occupies one row, and there is no division between each group of data. Example
-
Sample Input
-
23 14 2
-
Sample output
-
123121314212324313234414243
-
Source
-
[Hzyqazasdf] original
-
Uploaded
-
Hzyqazasdf
-
-
James, who is good at sorting