Alice and Bob are playing Luzhanqi. Each of them has a permutation of the following 24 pieces:
To determine the winner, we repeat the following process until someone wins the game or the game ends in a draw:
If both permutations are empty, the game ends in a draw.
If Alice's permutation is empty, Bob wins the game.
If Bob's permutation is empty, Alice wins the game.
Let the first piece in Alice's permutation be A and the first piece in Bob's permutation be B. The following is the outcome of the battle between A and B:
Bob knows Alice's permutation in advance and can decide his permutation based on that information. After Bob deciding his permutation, Alice can swap two pieces in Bob's permutation. Can Bob construct a permutation that wins against Alice's permutation no matter which pair of pieces she swaps?
The first line contains one integer T denoting the number of test cases (1≤T≤100).
Each of the next T lines contains 24 integers denoting Alice's permutation:
It is guaranteed that all permutations are chosen uniformly at random and contains exactly the 24 pieces described in the statement.
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.