CF1443A.Kids Seating

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

Kids Seating

Today the kindergarten has a new group of nn kids who need to be seated at the dinner table. The chairs at the table are numbered from 11 to 4n4n. Two kids can't sit on the same chair. It is known that two kids who sit on chairs with numbers aa and bb (aba \neq b) will indulge if:

  1. gcd(a,b)=1gcd(a, b) = 1 or,
  2. aa divides bb or bb divides aa.

gcd(a,b)gcd(a, b) — the maximum number xx such that aa is divisible by xx and bb is divisible by xx.

For example, if n=3n=3 and the kids sit on chairs with numbers 22, 33, 44, then they will indulge since 44 is divided by 22 and gcd(2,3)=1gcd(2, 3) = 1. If kids sit on chairs with numbers 44, 66, 1010, then they will not indulge.

The teacher really doesn't want the mess at the table, so she wants to seat the kids so there are no 22 of the kid that can indulge. More formally, she wants no pair of chairs aa and bb that the kids occupy to fulfill the condition above.

Since the teacher is very busy with the entertainment of the kids, she asked you to solve this problem.

Input

The first line contains one integer tt (1t1001 \leq t \leq 100) — the number of test cases. Then tt test cases follow.

Each test case consists of one line containing an integer nn (1n1001 \leq n \leq 100) — the number of kids.

Output

Output tt lines, which contain nn distinct integers from 11 to 4n4n — the numbers of chairs that the kids should occupy in the corresponding test case. If there are multiple answers, print any of them. You can print nn numbers in any order.

Samples

3
2
3
4
6 4
4 6 10
14 10 12 8

在线编程 IDE

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