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

#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int k, n, m;
    cin >> k >> n >> m;
    vector<int> v(n + m);
    for (int i{0}; i < n + m; i++) {
      cin >> v[i];
    }
    bool ans = true;
    sort(v.begin(), v.end());
    for (auto i : v) {
      if (i == 0) {
        k++;
      } else if (i > k) {
        ans = false;
      }
    }
    if (ans == true) {
      for (auto i : v) {
        cout << i << " ";
      }
      cout << endl;
    } else if (ans == false) {
      cout << -1 << endl;
    }
  }
  return 0;
}
