Telejump

Time limit1sMemory limit128 MB

Problem

Hongjun and friends plan to visit $n$ planets numbered $0$ through $n-1$. They teleport with the Telejump system co-developed by Sasung and Boogle, starting at planet $0$ and ending anywhere.

Three ticket types are available.

  • Type 1: move from $x$ to $x+1$ or $x-1$ when inside the range
  • Type 2: move from $x$ to $x+2$ or $x-2$ when inside the range
  • Type 3: move from $x$ to $x+3$ or $x-3$ when inside the range

They hold $a$ type-1 tickets, $b$ type-2 tickets, and $c$ type-3 tickets, with $a+b+c+1=n$. Each count is at least $3$, so $n \ge 10$.

Output a visit order that uses every planet exactly once and every ticket exactly once.

Input

The first line contains $T$ ($1 \le T \le 20$), the number of test cases.

Each test case is one line with three integers $a$, $b$, and $c$ ($3 \le a,b,c \le 5000$). For that case, $n=a+b+c+1$.

Output

For each test case, print one line with $n$ planet numbers separated by spaces. The route must start at planet $0$.

If multiple routes are valid, print any of them. Every input is guaranteed to be solvable.

Hint

Use length-3 jumps to cover large gaps, then spend the remaining type-1 and type-2 tickets on unvisited planets. When $a=b=c$, a repeating three-ticket pattern visits the whole line in order.