5

3 2 2
2 0
0 5

4 3 2
2 0 5
0 6

0 2 2
1 0
2 3

5 4 4
6 0 8 0
0 7 0 9

5 4 1
8 7 8 0
0

0 2 0 5
0 2 0 5 6
-1
0 6 0 7 0 8 0 9
-1

T = int(input())

for i in range(T):
    input()
    K,N,M = map(int, input().split())
    
    A = list(map(int, input().split()))
    B = list(map(int, input().split()))
    # standart_input
    
    if A.count(0)+B.count(0)+K < max(A+B):
        print(-1)
    else:
        print(*sorted(A+B))