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

tcase=int(input())
for _ in range(tcase):
    null=input()
    k,n,m = map(int,input().split())
    mo = list(map(int,input().strip().split()))
    po = list(map(int,input().strip().split()))
    res=[]
    num,a,b=k,0,0
    while a<len(mo) and b<len(po):
        if mo[a]<=po[b]:
            res.append(mo[a])
            a+=1
        else:
            res.append(po[b])
            b+=1
    while a<len(mo):
        res.append(mo[a])
        a+=1
    while b<len(po):
        res.append(po[b])
        b+=1
    for i in res:
        if i> num:
            break
        num+=1
    if num == n+m+k:
        new = ' '.join(map(str, res))
        print (new)
    else:
        print("-1")
