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

import math
inp=int(input())

for _ in range(inp):
	input()
	k,n,m=map(int,input().split(" "))
	nl=list(map(int,input().split(" ")))
	ml=list(map(int,input().split(" ")))
	nlcopy=nl[:]
	mlcopy=ml[:]
	final=nlcopy+mlcopy
	final.sort()
	flag=True
	d=k
	for i in final:
		if i==0:
			d+=1
		else:
			if d<i:
				flag=False
				break
	if flag:
		print(*final)
	else:
		print(-1)

# from wrapt_timeout_decorator import *
# @timeout(2.5)
# def i():
# 	p=0

# try:
# 	i()
# except Exception:
# 	print("TLE")