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 solve() {
  int k, n, m;
  cin >> k >> n >> m;
  vector<int> v;
  for (int i = 0; i < n + m; i++) {
    int x;
    cin >> x;
    v.push_back(x);
  }
  sort(v.begin(), v.end());
  int c0 = count(v.begin(), v.end(), 0);
  int mx = *max_element(v.begin(), v.end());
  if (k + c0 < mx)
    cout << -1;
  else {
    for (auto it : v) cout << it << " ";
  }
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    solve();
    cout << "\n";
  }
}
