| 2019 ICPC Asia-East Continent Final |
|---|
| Finished |
Alice and Bob are playing Luzhanqi. Each of them has a permutation of the following $$$24$$$ pieces:
The first line contains one integer $$$T$$$ denoting the number of test cases ($$$1\le T\le 100$$$).
Each of the next $$$T$$$ lines contains $$$24$$$ integers denoting Alice's permutation:
Output one line for each test case.
If Bob cannot construct the required permutation, print $$$-1$$$.
Otherwise, print $$$24$$$ integers representing Bob's permutation in the same format as in the input. If there are multiple solutions, print any. Bob's permutation must contain exactly the $$$24$$$ pieces described in the statement.
4 40 39 38 38 37 37 36 36 35 35 34 34 34 33 33 33 32 32 32 31 31 31 30 30 34 31 36 33 31 39 37 38 35 32 32 35 36 31 34 32 38 40 30 33 30 34 33 37 37 30 40 38 36 38 32 34 36 35 37 32 34 33 31 30 33 31 35 34 33 39 31 32 30 33 32 39 37 38 35 40 34 30 31 37 31 33 31 33 34 32 36 36 35 34 32 38
34 36 30 39 33 38 37 31 34 30 33 35 38 31 37 33 40 31 35 32 32 36 32 34 34 32 32 38 40 33 33 30 31 34 31 35 37 32 34 36 33 31 38 30 36 37 35 39 38 33 32 31 36 34 30 34 33 40 32 37 38 30 37 35 33 35 32 31 34 31 39 36 37 34 33 36 34 35 31 38 32 38 31 32 37 30 30 31 33 36 32 33 40 39 34 35
Note that the sample input and sample output contain wrapped lines to fit in the width of page.
| Name |
|---|


