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 Third_Question {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();
        while (t-- > 0) {
            int k, n, m;
            k = sc.nextInt();
            n = sc.nextInt();
            m = sc.nextInt();
            int count = 0;
            int[] arr = new int[n];
            for (int i = 0; i < n; i++) {
                int ai = sc.nextInt();
                arr[i] = ai;
                if(arr[i] == 0){
                    count++;
                }
            }

            int[] arr2 = new int[m];
            for (int i = 0; i < m; i++) {
                int ai = sc.nextInt();
                arr2[i] = ai;
                if(arr2[i] == 0){
                    count++;
                }
            }
            int[] res = new int[n+m];
            for (int i = 0; i < n; i++) {
                res[i] = arr[i];
            }
            int kk = 0;
            for (int i = n; i < n+m; i++) {
                res[i] = arr2[kk++];
            }

            Arrays.sort(res);
            //System.out.println(Arrays.toString(res));
            //System.out.println(count);

            if(k+count<res[res.length-1]){
                System.out.println(-1);
                continue;
            }
            for (int i = 0; i < res.length; i++) {
                System.out.print(res[i]+" ");
            }
            System.out.println();
        }
    }
}
