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;
const long long INF = 1e9 + 7;
struct fastIO {
  fastIO() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    cout << fixed << setprecision(12);
  }
} fio;
template <typename... T>
void read(T&... args) {
  ((cin >> args), ...);
}
void test_case() {
  long long k, n, m;
  read(k, n, m);
  vector<long long> a(n), b(m), ans, vis(m, 0);
  for (long long i = 0; i < a.size(); i++) cin >> a[i];
  ;
  for (long long i = 0; i < b.size(); i++) cin >> b[i];
  ;
  for (long long i = 0; i < n; i++) {
    if (a[i] <= k) {
      ans.push_back(a[i]);
      if (a[i] == 0) k++;
      continue;
    }
    for (long long time = 0; time < a[i] - k; time++) {
      for (long long j = 0; j < m; j++) {
        if (vis[j]) continue;
        if (b[j] == 0) {
          ans.push_back(b[j]);
          k++;
          vis[j] = 1;
          break;
        }
        if (k < b[j]) {
          cout << "-1\n";
          return;
        }
        ans.push_back(b[j]);
        vis[j] = 1;
      }
    }
    if (k < a[i]) {
      cout << "-1\n";
      return;
    }
    ans.push_back(a[i]);
  }
  for (long long i = 0; i < m; i++) {
    if (!vis[i]) ans.push_back(b[i]);
  }
  for (auto i : ans) cout << i << " ";
  cout << "\n";
  ;
}
int32_t main() {
  long long T = 1;
  cin >> T;
  while (T--) {
    test_case();
  }
  return 0;
}
