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>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define ll            long long int
#define endl          "\n"
#define MOD           1000000007
#define test()        ll t; cin>>t; while(t--)
#define ordered_set   tree<ll,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update>

/* Think More, Code Less */
/* Soch bo*dk Soch */

bool compare(ll a,ll b)
{
    return a<b;
}

int main ()
{
#ifndef ONLINE_JUDGE
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
#endif
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);  
    test()
    {
        ll k,n,m,i;
        cin>>k>>n>>m;

        vector<ll>a(n),b(m);

        for(i=0;i<n;i++)
        cin>>a[i];

        for(i=0;i<m;i++)
        cin>>b[i];

        sort(a.begin(),a.end());
        sort(b.begin(),b.end());

        vector<ll>f;


        for(i=0;i<n;i++)
        f.push_back(a[i]);

        for(i=0;i<m;i++)
        f.push_back(b[i]);

        sort(f.begin(),f.end());


        ll cnt=k;

        bool flag=true;

        for(i=0;i<f.size();i++)
        {
            if(f[i]==0)
            cnt++;

            else if(f[i]>cnt)
            {
                flag=false;
                break;
            }
        }

        // for(auto i:f)
        // cout<<i<<" ";
        // cout<<endl;

        if(flag==false)
        cout<<-1<<endl;


        else 
        {
            for(auto i:f)
            cout<<i<<" ";
            cout<<endl;
        }
    }
    return 0;
}
