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;
unsigned long long mod = 1e9 + 7;
unsigned long long fact(unsigned long long n) {
  unsigned long long ans = 1;
  for (unsigned long long i = 2; i <= n; i++)
    ans = ((ans % 1000000007) * (i % 1000000007)) % 1000000007;
  return ans;
}
long long powMod(long long base, long long exp) {
  long long ans = 1;
  for (int i = 0; i < exp; i++) {
    ans *= base;
    ans %= mod;
  }
  return ans;
}
long long powMod(long long base, long long exp, long long md) {
  long long ans = 1;
  for (int i = 0; i < exp; i++) {
    ans *= base;
    ans %= md;
  }
  return ans;
}
void answer() {
  int k, n, m;
  cin >> k >> n >> m;
  vector<int> a(n + m);
  for (int i = 0; i < n + m; i++) {
    cin >> a[i];
  }
  sort(a.begin(), a.end());
  for (int i = 0; i < n + m; i++) {
    if (a[i] == 0)
      k++;
    else {
      if (a[i] > k) {
        cout << "-1\n";
        return;
      }
    }
  }
  for (int i : a) {
    cout << i << ' ';
  }
  cout << '\n';
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout << setprecision(6) << fixed;
  int t = 1;
  cin >> t;
  cin.ignore();
  while (t--) {
    answer();
  }
  return 0;
}
