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

    #from _typeshed import SupportsKeysAndGetItem
import sys
#sys.stdin=open("input.txt","r");
#sys.stdout=open("output.txt","w")
####### GLOBAL ###############
MOD=1000000007
no=lambda:print("NO")
yes=lambda:print("YES")
_1=lambda:print(-1)
ari=lambda:[int(_) for _ in input().split()]
cin=lambda:int(input())
cis=lambda:input()
show=lambda x: print(x)
########### END #########
######
test_case=1
test_case=int(input())
######
def binarysearch(arr,low,high,value):
    if high<low:
        return -1
    mid=low+(high-low)//2
    if value == arr[mid]:
        return mid
    elif value>arr[mid]:
        low=mid+1
        return binarysearch(arr,low,high,value)
    else:
        high=mid-1
        return binarysearch(arr,low,high,value)
def ans():
    lno,n,m=ari()
    mono=ari()
    poly=ari()
    mono+=poly
    mono.sort()
    for i in mono:
        if i==0:
            lno+=1
        if i>lno:
            _1()
            return
    print(*mono)
    return
    
        
for _ in range(test_case):
    garbage=input()
    ans()