Problem: You are given a complete directed graph with vertices: each pair of vertices in have both directed edges and ; there are no self-loops.
You should find such a cycle in that visits every directed edge exactly once (allowing for revisiting vertices).
We can write such cycle as a list of vertices — a visiting order, where each occurs exactly once.
Find the lexicographically smallest such cycle. It's not hard to prove that the cycle always exists.
Since the answer can be too large print its segment, in other words, .
Input Format: The first line contains the single integer () — the number of test cases.
Next lines contain test cases — one per line. The first and only line of each test case contains three integers , and (, , ) — the number of vertices in , and segment of the cycle to print.
It's guaranteed that the total sum of doesn't exceed and the total sum of doesn't exceed .
Output Format: For each test case print the segment of the lexicographically smallest cycle that visits every edge exactly once.
Note: In the second test case, the lexicographically minimum cycle looks like: .
In the third test case, it's quite obvious that the cycle should start and end in vertex .