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())
while t:
    t-=1
    s=input()
    k,n,m=[int(x) for x in input().split()]
    a=[int(x) for x in input().split()]
    b=[int(x) for x in input().split()]
    zero=[]
    num=[]
    for i in range(n):
        if a[i]==0:
            zero.append(0)
        else:
            num.append(a[i])
    for i in range(m):
        if b[i]==0:
            zero.append(0)
        else:
            num.append(b[i])
    num.sort()
    if k+len(zero)<num[-1]:
        print(-1)
    else:
        ans=zero+num
        print(*ans)
