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

if __name__ == "__main__":
    t = int(input())
    for _ in range(t):
        input()
        k, n, m = map(int, input().split())
        a = [int(x) for x in input().split()]
        b = [int(x) for x in input().split()]

        za = a.count(0)
        zeros = za + b.count(0)
        ma = max(a)
        m = max(ma, max(b))
        if k + zeros < m:
            print(-1)
        else:
            a.extend(b)
            a = list(sorted(a))
            for x in a:
                print(x, end=' ')
            print()
