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;
void fast() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
int main() {
  fast();
  long long int pr;
  cin >> pr;
  while (pr--) {
    long long int k, n, m, i, j, c = 0, f = 0;
    cin >> k >> n >> m;
    long long int a[n], b[m];
    for (i = 0; i < n; i++) {
      cin >> a[i];
    }
    for (i = 0; i < m; i++) {
      cin >> b[i];
    }
    vector<long long int> ans;
    if (n < m) {
      for (j = 0; j < n; j++) {
        ans.push_back(min(a[j], b[j]));
        ans.push_back(max(a[j], b[j]));
      }
      for (; j < m; j++) {
        ans.push_back(b[j]);
      }
      for (i = 0; i < n + m; i++) {
        if (ans[i] == 0) {
          c++;
        } else {
          if (ans[i] > c + k) {
            f = 1;
            break;
          }
        }
      }
      if (f == 1) {
        cout << -1 << endl;
      } else {
        for (auto pp = ans.begin(); pp != ans.end(); pp++) cout << *pp << " ";
        cout << endl;
      }
    } else {
      for (j = 0; j < m; j++) {
        ans.push_back(min(a[j], b[j]));
        ans.push_back(max(a[j], b[j]));
      }
      for (; j < n; j++) {
        ans.push_back(a[j]);
      }
      for (i = 0; i < n + m; i++) {
        if (ans[i] == 0) {
          c++;
        } else {
          if (ans[i] > c + k) {
            f = 1;
            break;
          }
        }
      }
      if (f == 1) {
        cout << -1 << endl;
      } else {
        for (auto pp = ans.begin(); pp != ans.end(); pp++) cout << *pp << " ";
        cout << endl;
      }
    }
  }
  return 0;
}
