CF1772C.Different Differences

传统题 时间 2000 ms 内存 256 MiB 5 尝试 1 已通过 1 标签

Different Differences

An array aa consisting of kk integers is strictly increasing if a1<a2<<aka_1 \lt a_2 \lt \dots \lt a_k. For example, the arrays [1,3,5][1, 3, 5], [1,2,3,4][1, 2, 3, 4], [3,5,6][3, 5, 6] are strictly increasing; the arrays [2,2][2, 2], [3,7,5][3, 7, 5], [7,4,3][7, 4, 3], [1,2,2,3][1, 2, 2, 3] are not.

For a strictly increasing array aa of kk elements, let's denote the characteristic as the number of different elements in the array [a2a1,a3a2,,akak1][a_2 - a_1, a_3 - a_2, \dots, a_k - a_{k-1}]. For example, the characteristic of the array [1,3,4,7,8][1, 3, 4, 7, 8] is 33 since the array [2,1,3,1][2, 1, 3, 1] contains 33 different elements: 22, 11 and 33.

You are given two integers kk and nn (knk \le n). Construct an increasing array of kk integers from 11 to nn with maximum possible characteristic.

Input

The first line contains one integer tt (1t8191 \le t \le 819) — the number of test cases.

Each test case consists of one line containing two integers kk and nn (2kn402 \le k \le n \le 40).

Output

For each test case, print kk integers — the elements of the strictly increasing array aa with the maximum possible characteristic. If there are multiple answers, print any of them.

Samples

7
5 9
4 12
3 3
3 4
4 4
4 6
8 11
1 3 4 7 8
2 4 7 12
1 2 3
1 3 4
1 2 3 4
2 4 5 6
1 2 3 5 6 7 8 11

在线编程 IDE

建议全屏模式获得最佳体验