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 = 1e15;
const long long MOD = 1e9 + 7;
const long long N = 1e5 + 5;
long long i;
char st;
string s;
long long a[1000];
void solve() {
  long long k;
  long long n, m;
  cin >> k >> n >> m;
  long long dem0 = 0;
  long long j = 0;
  for (long long i = 0; i < n + m; i++) {
    long long x;
    cin >> x;
    if (x == 0)
      dem0++;
    else {
      a[j] = x;
      j++;
    }
  }
  sort(a, a + j);
  if (k + dem0 < a[j - 1]) {
    cout << -1 << '\n';
    return;
  }
  for (long long i = 0; i < j; i++) {
    while (k < a[i]) {
      cout << 0 << " ";
      k++;
    }
    if (k >= a[i]) cout << a[i] << " ";
  }
  cout << endl;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t;
  cin >> t;
  while (t--) {
    solve();
  }
}
