Little relyt871 is solving a puzzle. The key to the puzzle is a permutation containing numbers $$$1 \dots n$$$. The values at some positions of the permutation are already fixed, and relyt871 needs to fill numbers into the remaining positions.
Besides, little relyt871 has gathered $$$m$$$ extra requirements about the permutation. Let the solution be represented as $$$p_1,p_2,...,p_n$$$, each clue is a pair of indices $$$(u_i,v_i)$$$, which means that $$$p_{u_i} \lt p_{v_i}$$$ should be satisfied in the solution.
Little relyt871 wonders if all requirements may be satisfied at the same time. Write a program to find a valid solution when there is one.
The first line of the input contains the number of test cases $$$T\ (1 \leq T \leq 20\,000)$$$.
For each test case:
The sum of $$$n$$$ over all test cases doesn't exceed $$$200\,000$$$, and the sum of $$$m$$$ doesn't exceed $$$500\,000$$$.
For each test case:
24 41 0 0 41 21 32 43 43 20 3 11 23 1
1 3 2 4 2 3 1
14 41 4 0 01 21 32 43 4
-1
| Name |
|---|


