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 java.util.Arrays;
import java.util.Scanner;

public class C {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int lines = s.nextInt();
        s.nextLine();

        for (int i = 0; i < lines; i += 1) {
            //System.out.print("Case #" + (i / 2 + 1) + ": ");
            s.nextLine();
            solve(s.nextLine().split(" "), s.nextLine().split(" "), s.nextLine().split(" "));
        }
    }


    public static void solve(String a[], String b[], String c[]) {
        int k = Integer.parseInt(a[0]);

        int data[] = new int[b.length + c.length];
        for (int i = 0; i < b.length; i++) {
            data[i] = Integer.parseInt(b[i]);
        }
        for (int i = 0; i < c.length; i++) {
            data[b.length + i] = Integer.parseInt(c[i]);
        }


        Arrays.sort(data);


        for (int i = 0; i < data.length; i++) {
            if (data[i] == 0) {
                k++;
            } else {
                i = data.length;
            }
        }

        if (data[data.length - 1] > k) {
            System.out.println("-1");
            return;
        }


        String out = Arrays.toString(data).replace(",", "").replace('[', ' ').replace(']', ' ').substring(1);
        System.out.println(out.substring(0, out.length() - 1));
    }
}
