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 math import *
from sys import *
input=stdin.readline

# map(int,input().split())

for _ in range(int(input())):
    input()
    k,n,m=map(int,input().split())
    a=list(map(int,input().split()))
    b=list(map(int,input().split()))
    cntr=1;l=[]
    for i in range(min(n,m)):
        l.append(min(a[i],b[i]))
        l.append(max(a[i],b[i]))
    if m>n:
        for i in range(n,m):
            l.append(b[i])
    if n>m:
        for i in range(m,n):
            l.append(a[i])
    for i in range(len(l)):
        if l[i]==0:
            k+=1
        else:
            if l[i]>k:
                cntr=0
                break
    if cntr:
        print(*l)
    else:
        print(-1)