#include <bits/stdc++.h>
using namespace std;

#define F first
#define S second
#define sqr(x) ((x) * (x))
#define cub(x) ((x) * (x) * (x))
#define pii pair<int, int>
#define all(c) c.begin(), c.end()
#define pb push_back
#define ppb pop_back
#define mp make_pair
#define no cout<<"NO"
#define yes cout<<"YES"
#define name "input"

typedef unsigned long long ull;
typedef long long ll;
typedef unsigned int ui;
typedef long double ld;

void faster(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
}

const ll INF = 1e18;
const ll MOD = 998244353;
const ll MAXN = 6e5 + 1;
const ld EPS = 1e-12;

int bPow(int v, int u, int mod){if(!u)	return 1;	int res = bPow(v, u / 2, mod);	res = (res * 1ll * res) % mod;	if(u & 1) res = (res * 1ll * v) % mod;	return res; }
int fact(int n){ int f=1;  if((n==0)||(n==1)) f = 1; else for(int i=1;i<=n;i++) f*=i; return f; }
int fib(int n){ int a=0,b=1; for (int i = 0; i < n; ++i){ b=b+a; a=b-a; }return b; }
bool compare(const string &c1,const string &c2){ return c1.size() < c2.size(); }
ll gcd(ll a, ll b){ return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b){ return a / gcd(a, b) * b; }
string alph = "abcdefghijklmnopqrstuvwxyz";
// freopen("area1.in","r",stdin);
// freopen("area1.out","w",stdout);

int n,k;
void solve(){
	cin>>n>>k;
	std::vector<int> a(n);
	bool f=true;
	for (int i = 0; i < n; ++i)
	{
		cin>>a[i];
		if(a[i]>k)
			f=false;
	}
	sort(all(a));
	int mx=a[n-1];
	std::vector<int> cnt(mx,0);
	for (int i = 0; i < mx; ++i)
	{
		cnt[a[i]]++;
	}
	sort(all(cnt));
	if(!f){
		cout<<-1;
	}else{
		cout<<cnt[n-1]*k<<endl;
		for (int i = 0; i < cnt[n-1]; ++i)
		{
			for (int j = 1; j <= k; ++j)
			{
				cout<<j<<" ";
			}
		}
	}

}

int main(){

	faster();

	int T=1;
	cin>>T;

	while(T--){
		solve();
		cout<<"\n";
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

#define F first
#define S second
#define sqr(x) ((x) * (x))
#define cub(x) ((x) * (x) * (x))
#define pii pair<int, int>
#define all(c) c.begin(), c.end()
#define pb push_back
#define ppb pop_back
#define mp make_pair
#define no cout<<"NO"
#define yes cout<<"YES"
#define name "input"

typedef unsigned long long ull;
typedef long long ll;
typedef unsigned int ui;
typedef long double ld;

void faster(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
}

const ll INF = 1e18;
const ll MOD = 998244353;
const ll MAXN = 6e5 + 1;
const ld EPS = 1e-12;

int bPow(int v, int u, int mod){if(!u)	return 1;	int res = bPow(v, u / 2, mod);	res = (res * 1ll * res) % mod;	if(u & 1) res = (res * 1ll * v) % mod;	return res; }
int fact(int n){ int f=1;  if((n==0)||(n==1)) f = 1; else for(int i=1;i<=n;i++) f*=i; return f; }
int fib(int n){ int a=0,b=1; for (int i = 0; i < n; ++i){ b=b+a; a=b-a; }return b; }
bool compare(const string &c1,const string &c2){ return c1.size() < c2.size(); }
ll gcd(ll a, ll b){ return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b){ return a / gcd(a, b) * b; }
string alph = "abcdefghijklmnopqrstuvwxyz";
// freopen("area1.in","r",stdin);
// freopen("area1.out","w",stdout);

int n,k;
void solve(){
	cin>>n>>k;
	std::vector<int> a(n);
	bool f=true;
	std::vector<int> cnt(n,0);
	for (int i = 0; i < n; ++i)
	{
		cin>>a[i];
		if(a[i]>k)
			f=false;
		cnt[a[i]]++;
	}
	sort(all(cnt));
	if(!f){
		cout<<-1;
	}else{
		for (int i = 0; i < cnt[n-1]; ++i)
		{
			for (int j = 1; j <= k; ++j)
			{
				cout<<j<<" ";
			}
		}
	}

}

int main(){

	faster();

	int T=1;
	cin>>T;

	while(T--){
		solve();
		cout<<"\n";
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

#define F first
#define S second
#define sqr(x) ((x) * (x))
#define cub(x) ((x) * (x) * (x))
#define pii pair<int, int>
#define all(c) c.begin(), c.end()
#define pb push_back
#define ppb pop_back
#define mp make_pair
#define no cout<<"NO"
#define yes cout<<"YES"
#define name "input"

typedef unsigned long long ull;
typedef long long ll;
typedef unsigned int ui;
typedef long double ld;

void faster(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
}

const ll INF = 1e18;
const ll MOD = 998244353;
const ll MAXN = 6e5 + 1;
const ld EPS = 1e-12;

int bPow(int v, int u, int mod){if(!u)	return 1;	int res = bPow(v, u / 2, mod);	res = (res * 1ll * res) % mod;	if(u & 1) res = (res * 1ll * v) % mod;	return res; }
int fact(int n){ int f=1;  if((n==0)||(n==1)) f = 1; else for(int i=1;i<=n;i++) f*=i; return f; }
int fib(int n){ int a=0,b=1; for (int i = 0; i < n; ++i){ b=b+a; a=b-a; }return b; }
bool compare(const string &c1,const string &c2){ return c1.size() < c2.size(); }
ll gcd(ll a, ll b){ return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b){ return a / gcd(a, b) * b; }
string alph = "abcdefghijklmnopqrstuvwxyz";
// freopen("area1.in","r",stdin);
// freopen("area1.out","w",stdout);

int n,k;
void solve(){
	cin>>n>>k;
	std::vector<int> a(n);
	bool f=true;
	for (int i = 0; i < n; ++i)
	{
		cin>>a[i];
		if(a[i]>k)
			f=false;
	}
	sort(all(cnt));
	if(!f){
		cout<<-1;
	}else{
		for (int i = 0; i < 100; ++i)
		{
			for (int j = 1; j <= k; ++j)
			{
				cout<<j<<" ";
			}
		}
	}

}

int main(){

	faster();

	int T=1;
	cin>>T;

	while(T--){
		solve();
		cout<<"\n";
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main() {
	int t;
	cin>>t;

	while(t--){
	    long long int n,k,cnt=0;
	    cin>>n>>k;
	    vector<int> v;
	    int arr1[10009],arr0[109],arr2[101]={0};
	    for(int i=1;i<n+1;i++){
	        cin>>arr0[i];
	        if(arr2[arr0[i]]==0 ){cnt++;v.push_back(arr0[i]);}

	            arr2[arr0[i]]+=1;
	        }
	    int ma=-1,u;
	    for(int i=1;i<101;i++){if(arr2[i]>ma){ma=arr2[i];u=i;}}
	    sort(arr2,arr2+101);
	    reverse(arr2,arr2+101);
	    int m=arr2[0]+1;
	    if(cnt>k) {cout<<-1<<endl;continue;}
	    while(v.size()!=k){
	        v.push_back(u);
	    }
	    for(int i=0;i<k;i++){
	        for(int j=0;j<m;j++){
	            arr1[i+k*j]=v[i];

	        }
	        if((k*m)>10000) n=10000;
	        else n=k*m;
	    }cout<<n<<endl;
	    for(int i=0;i<n;i++){cout<<arr1[i]<<" ";}

	    cout<<endl;

	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main() {
    ios_base::sync_with_stdio(false);
	int t;
	cin>>t;

	while(t--){
	    int n,k,q,cnt=0;
	    cin>>n>>k;
	    vector<int> v;
	    int arr1[11009]={1},arr2[109]={0};
	    for(int i=0;i<n;i++){
	        cin>>q;
	        if(arr2[q]==0 ){cnt++;v.push_back(q);}
	            arr2[q]+=1;
	        }
	    int ma=-1,u;
	    for(int i=1;i<n+1;i++){if(arr2[i]>ma){ma=arr2[i];u=i;}}
	    int m=arr2[u]+100;
	    if(cnt>k) {cout<<-1<<endl;continue;}
	    while(v.size()!=k){
	        v.push_back(u);
	    }
	    for(int i=0;i<k;i++){
	        for(int j=0;j<m;j++){
	            if(i+k*j<=10000)
	            {arr1[i+k*j]=v[i];}
	        }
	        }
	        if((k*m)>10000) n=10000;
	        else n=k*m;
	    cout<<n<<endl;
	    for(int i=0;i<n;i++){cout<<arr1[i]<<" ";}
	    cout<<endl;
	}
	return 0;
}


#include<iostream>
#include<algorithm>
#include<math.h>
#include<vector>
using namespace std;
int main(){
    int t;
    cin>>t;
    while(t--){
        int n,k;
        cin>>n>>k;
        int a[n];
        int time[101]={0};
        vector<int> v;
        for(int i=0;i<n;i++){
            cin>>a[i];
            if(time[a[i]]==0){
                time[a[i]]++;
                v.push_back(a[i]);
            }
            else time[a[i]]++;
        }
//        for(int i=0;i<v.size();i++){
//            cout<<v[i]<<" ";
//        }
//        cout<<"\n";
//        for(int i=0;i<100;i++){
//            cout<<time[i]<<" ";
//        }
//        cout<<"\n";
        if(v.size()>k) cout<<-1<<endl;
        else{
            while(v.size()<k){
                v.push_back(1);
            }
            int maxx = *max_element(time, time+101);
//            cout<<maxx<<endl;
            cout<<(maxx+100)*k<<endl;
            for(int i=0; i< maxx+100;i++){
                for(int j=0;j<k;j++){
                    cout<<v[j]<<" ";
                }
            }
            cout<<"\n";
        }
    }
}


#include <bits/stdc++.h>
using namespace std;

int main() {
	int t;
	cin>>t;

	while(t--){
	    long long int n,k,cnt=0;
	    cin>>n>>k;
	    vector<int> v;
	    int arr1[10001],arr0[101],arr2[102]={0};
	    for(int i=1;i<n+1;i++){
	        cin>>arr0[i];
	        if(arr2[arr0[i]]==0 ){cnt++;v.push_back(arr0[i]);}
	            arr2[arr0[i]]+=1;
	        }
	    int ma=-1,u;
	    for(int i=1;i<101;i++){if(arr2[i]>ma){ma=arr2[i];u=i;}}
	    int m=arr2[u]+1;
	    if(cnt>k) {cout<<-1<<endl;continue;}
	    while(v.size()!=k){
	        v.push_back(u);
	    }
	    for(int i=0;i<k;i++){
	        for(int j=0;j<m;j++){
	            arr1[i+k*j]=v[i];

	        }
	        if((k*m)>10000) n=10000;
	        else n=k*m;
	    }cout<<n<<endl;
	    for(int i=0;i<n;i++){cout<<arr1[i]<<" ";}
	    cout<<endl;
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main() {
	int t;
	cin>>t;

	while(t--){
	    int n,k,q,cnt=0;
	    cin>>n>>k;
	    vector<int> v;
	    int arr1[11009]={1},arr2[109]={0};
	    for(int i=0;i<n;i++){
	        cin>>q;
	        if(arr2[q]==0 ){cnt++;v.push_back(q);}
	            arr2[q]+=1;
	        }
	    int ma=-1,u;
	    for(int i=1;i<n+1;i++){if(arr2[i]>ma){ma=arr2[i];u=i;}}
	    int m=arr2[u]+1;
	    if(cnt>k) {cout<<-1<<endl;continue;}
	    while(v.size()!=k){
	        v.push_back(u);
	    }
	    for(int i=0;i<k;i++){
	        for(int j=0;j<m;j++){
	            arr1[i+k*j]=v[i];
	        }
	        }
	        if((k*m)>10000) n=10000;
	        else n=k*m;
	    cout<<n<<endl;
	    for(int i=0;i<n;i++){cout<<arr1[i]<<" ";}
	    cout<<endl;
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main() {
	int t;
	cin>>t;

	while(t--){
	    int n,k,q,cnt=0;
	    cin>>n>>k;
	    vector<int> v;
	    int arr1[10001]={1},arr2[102]={0};
	    for(int i=0;i<n;i++){
	        cin>>q;
	        if(arr2[q]==0 ){cnt++;v.push_back(q);}
	            arr2[q]+=1;
	        }
	    int ma=-1,u;
	    for(int i=1;i<101;i++){if(arr2[i]>ma){ma=arr2[i];u=i;}}
	    int m=arr2[u]+1;
	    if(cnt>k) {cout<<-1<<endl;continue;}
	    while(v.size()!=k){
	        v.push_back(u);
	    }
	    for(int i=0;i<k;i++){
	        for(int j=0;j<m;j++){
	            arr1[i+k*j]=v[i];
	        }
	        }
	        if((k*m)>10000) n=10000;
	        else n=k*m;
	    cout<<n<<endl;
	    for(int i=0;i<n;i++){cout<<arr1[i]<<" ";}
	    cout<<endl;
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main() {
	int t;
	cin>>t;

	while(t--){
	    long long int n,k,cnt=0;
	    cin>>n>>k;
	    vector<int> v;
	    int arr1[10009],arr0[109],arr2[101]={0};
	    for(int i=1;i<n+1;i++){
	        cin>>arr0[i];
	        if(arr2[arr0[i]]==0 ){cnt++;v.push_back(arr0[i]);}

	            arr2[arr0[i]]+=1;
	        }

	    sort(arr2,arr2+101);
	    reverse(arr2,arr2+101);
	    int m=arr2[0]+2;
	    if(cnt>k) {cout<<-1<<endl;continue;}
	    while(v.size()!=k){
	        v.push_back(1);
	    }
	    for(int i=0;i<v.size();i++){
	        for(int j=0;j<m;j++){
	            arr1[i+k*j]=v[i];

	        }
	    }cout<<k*m<<endl;
	    for(int i=0;i<v.size()+k*(m-1);i++){cout<<arr1[i]<<" ";}

	    cout<<endl;

	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main() {
	int t;
	cin>>t;

	while(t--){
	    long long int n,k,cnt=0;
	    cin>>n>>k;
	    vector<int> v;
	    int arr1[10009],arr0[109],arr2[101]={0};
	    for(int i=1;i<n+1;i++){
	        cin>>arr0[i];
	        if(arr2[arr0[i]]==0 ){cnt++;v.push_back(arr0[i]);}

	            arr2[arr0[i]]+=1;
	        }

	    sort(arr2,arr2+101);
	    reverse(arr2,arr2+101);
	    int m=arr2[0];
	    if(cnt>k) {cout<<-1<<endl;continue;}
	    while(v.size()!=k){
	        v.push_back(1);
	    }
	    for(int i=0;i<v.size();i++){
	        for(int j=0;j<m;j++){
	            arr1[i+k*j]=v[i];

	        }
	    }cout<<k*m<<endl;
	    for(int i=0;i<v.size()+k*(m-1);i++){cout<<arr1[i]<<" ";}

	    cout<<endl;

	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main() {
    ios_base::sync_with_stdio(false);
	int t;
	cin>>t;

	while(t--){
	    int n,k,q,cnt=0;
	    cin>>n>>k;
	    vector<int> v;
	    int arr1[11009]={1},arr2[109]={0};
	    for(int i=0;i<n;i++){
	        cin>>q;
	        if(arr2[q]==0 ){cnt++;v.push_back(q);}
	            arr2[q]+=1;
	        }
	    int ma=-1,u;
	    for(int i=1;i<n+1;i++){if(arr2[i]>ma){ma=arr2[i];u=i;}}
	    int m=arr2[u]+100;
	    if(cnt>k) {cout<<-1<<endl;continue;}
	    while(v.size()!=k){
	        v.push_back(u);
	    }
	    for(int i=0;i<k;i++){
	        for(int j=0;j<m;j++){
	            arr1[i+k*j]=v[i];
	        }
	        }
	        if((k*m)>10000) n=10000;
	        else n=k*m;
	    cout<<n<<endl;
	    for(int i=0;i<n;i++){cout<<arr1[i]<<" ";}
	    cout<<endl;
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main() {
	int t;
	cin>>t;

	while(t--){
	    int n,k,q,cnt=0;
	    cin>>n>>k;
	    vector<int> v;
	    int arr1[11009]={1},arr2[109]={0};
	    for(int i=0;i<n;i++){
	        cin>>q;
	        if(arr2[q]==0 ){cnt++;v.push_back(q);}
	            arr2[q]+=1;
	        }
	    int ma=-1,u;
	    for(int i=1;i<n+1;i++){if(arr2[i]>ma){ma=arr2[i];u=i;}}
	    int m=arr2[u]+100;
	    if(cnt>k) {cout<<-1<<endl;continue;}
	    while(v.size()!=k){
	        v.push_back(u);
	    }
	    for(int i=0;i<k;i++){
	        for(int j=0;j<m;j++){
	            arr1[i+k*j]=v[i];
	        }
	        }
	        if((k*m)>10000) n=10000;
	        else n=k*m;
	    cout<<n<<endl;
	    for(int i=0;i<n;i++){cout<<arr1[i]<<" ";}
	    cout<<endl;
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main() {
	int t;
	cin>>t;

	while(t--){
	    long long int n,k,cnt=0;
	    cin>>n>>k;
	    vector<int> v;
	    int arr1[10009],arr0[109],arr2[101]={0};
	    for(int i=1;i<n+1;i++){
	        cin>>arr0[i];
	        if(arr2[arr0[i]]==0 ){cnt++;v.push_back(arr0[i]);}

	            arr2[arr0[i]]+=1;
	        }

	    sort(arr2,arr2+101);
	    reverse(arr2,arr2+101);
	    int m=arr2[0]+1;
	    if(cnt>k) {cout<<-1<<endl;continue;}
	    while(v.size()!=k){
	        v.push_back(1);
	    }
	    for(int i=0;i<v.size();i++){
	        for(int j=0;j<m;j++){
	            arr1[i+k*j]=v[i];

	        }
	        if((k*m)>10000) n=10000;
	        else n=k*m;
	    }cout<<n<<endl;
	    for(int i=0;i<n;i++){cout<<arr1[i]<<" ";}

	    cout<<endl;

	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main() {
	int t;
	cin>>t;

	while(t--){
	    int n,k,q,cnt=0;
	    cin>>n>>k;
	    vector<int> v;
	    int arr1[10009]={1},arr2[109]={0};
	    for(int i=0;i<n;i++){
	        cin>>q;
	        if(arr2[q]==0 ){cnt++;v.push_back(q);}
	            arr2[q]+=1;
	        }
	    int ma=-1,u;
	    for(int i=1;i<n+1;i++){if(arr2[i]>ma){ma=arr2[i];u=i;}}
	    int m=arr2[u]+1;
	    if(cnt>k) {cout<<-1<<endl;continue;}
	    while(v.size()!=k){
	        v.push_back(u);
	    }
	    for(int i=0;i<k;i++){
	        for(int j=0;j<m;j++){
	            arr1[i+k*j]=v[i];
	        }
	        }
	        if((k*m)>10000) n=10000;
	        else n=k*m;
	    cout<<n<<endl;
	    for(int i=0;i<n;i++){cout<<arr1[i]<<" ";}
	    cout<<endl;
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long int ull;
typedef pair<ll,ll> pii;
typedef tuple<ll,ll,ll> tii;
typedef vector<ll> vi;
typedef vector<pii> vii;
typedef map<ll,ll> mi;
typedef map<pii,ll> mii;

#define endl "\n"
#define pb push_back
#define sq(a) (a)*(a)
#define rep(i,a,b) for(int i = a; i < b; i++)
#define mod 1000000007
#define PI 3.141592653589793238

#define IOS ios_base::sync_with_stdio(false);cin.tie(NULL);

ll gcd(ll a, ll b)
{
    if (b == 0)
        return a;
    return gcd(b, a % b);
}

ll exp(ll x,ll n)
{
    ll result=1;
    while(n>0)
    {
        if(n % 2 ==1)
            result=(result * x)%mod;
        x=(x*x)%mod;
        n=n/2;
    }
    return result;
}

int32_t main()
{
    #ifndef ONLINE_JUDGE
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
    #endif

    IOS

    int t;
    cin>>t;
    while(t--)
    {
    	int n,k;
    	cin>>n>>k;
    	int a[n];
    	map<int,int> mp;
    	int temp=1;
    	for(int i=0;i<n;i++)
    	{
    		cin>>a[i];
    		mp[a[i]]++;
    		temp=max(temp,mp[a[i]]);
    	}

    	if(mp.size()>k)
    	{
    		cout<<-1<<endl;
    		continue;
    	}

    	for(int i=0;i<mp.size()-k;i++)
    	{
    		mp[mp.rbegin()->first+1]++;
    	}

    	string ans,p;

    	for(auto x : mp)
    	{
    		p+='0'+ x.first;
    	}

    	for(int i=0;i<temp+1;i++)
    	{
    		ans+=p;
    	}

    	cout<<ans.size()<<endl;
    	for(int i=0;i<ans.length();i++)
    		cout<<ans[i]<<" ";
    	cout<<endl;
    }

    return 0;
}


#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long int ull;
typedef pair<ll,ll> pii;
typedef tuple<ll,ll,ll> tii;
typedef vector<ll> vi;
typedef vector<pii> vii;
typedef map<ll,ll> mi;
typedef map<pii,ll> mii;

#define endl "\n"
#define pb push_back
#define sq(a) (a)*(a)
#define rep(i,a,b) for(int i = a; i < b; i++)
#define mod 1000000007
#define PI 3.141592653589793238

#define IOS ios_base::sync_with_stdio(false);cin.tie(NULL);

ll gcd(ll a, ll b)
{
    if (b == 0)
        return a;
    return gcd(b, a % b);
}

ll exp(ll x,ll n)
{
    ll result=1;
    while(n>0)
    {
        if(n % 2 ==1)
            result=(result * x)%mod;
        x=(x*x)%mod;
        n=n/2;
    }
    return result;
}

int32_t main()
{
    #ifndef ONLINE_JUDGE
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
    #endif

    IOS

    int t;
    cin>>t;
    while(t--)
    {
    	int n,k;
    	cin>>n>>k;
    	int a[n];
    	set<int> s;
    	for(int i=0;i<n;i++)
    	{
    		cin>>a[i];
    		s.insert(a[i]);
    	}

    	if(s.size()>k)
    	{
    		cout<<-1<<endl;
    		continue;
    	}

    	while(s.size()<k)
    	{
    		s.insert(*(s.rbegin())+1);
    	}

    	string ans,p;
    	for(auto x:s)
    	{
    		p+='0'+x;
    	}

    	for(int i=0;i<n/k;i++)
    	{
    		ans+=p;
    	}

    	for(int i=0;i<n%k;i++)
    	{
    		ans+=p[i];
    	}

    	for(int i=0;i<ans.length();i++)
    		cout<<ans[i]<<" ";
    	cout<<endl;
    }

    return 0;
}


#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long int ull;
typedef pair<ll,ll> pii;
typedef tuple<ll,ll,ll> tii;
typedef vector<ll> vi;
typedef vector<pii> vii;
typedef map<ll,ll> mi;
typedef map<pii,ll> mii;

#define pb push_back
#define sq(a) (a)*(a)
#define rep(i,a,b) for(int i = a; i < b; i++)
#define mod 1000000007
#define PI 3.141592653589793238

#define IOS ios_base::sync_with_stdio(false);cin.tie(NULL);

ll gcd(ll a, ll b)
{
    if (b == 0)
        return a;
    return gcd(b, a % b);
}

ll exp(ll x,ll n)
{
    ll result=1;
    while(n>0)
    {
        if(n % 2 ==1)
            result=(result * x)%mod;
        x=(x*x)%mod;
        n=n/2;
    }
    return result;
}

int32_t main()
{
    #ifndef ONLINE_JUDGE
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
    #endif

    IOS

    int t;
    cin>>t;
    while(t--)
    {
    	int n,k;
    	cin>>n>>k;
    	int a[n];
    	unordered_map<int,int> mp;
    	int temp=1;
    	for(int i=0;i<n;i++)
    	{
    		cin>>a[i];
    		mp[a[i]]++;
    		temp=max(temp,mp[a[i]]);
    	}

    	if(k==n)
    	{
    		for(int i=0;i<n;i++)
    		{
    			cout<<a[i]<<" ";
    		}
    		cout<<endl;
    		continue;
    	}

    	if(mp.size()>k)
    	{
    		cout<<-1<<endl;
    		continue;
    	}

    	string ans,p;

    	for(auto x : mp)
    	{
    		p+='0'+ x.first;
    	}

    	char c=p[p.length()-1];

    	for(int i=0;i<k-mp.size();i++)
    	{
    		p+=c;
    	}

    	for(int i=0;i<n;i++)
    	{
    		ans+=p;
    	}

    	cout<<ans.size()<<endl;

    	for(int i=0;i<ans.length();i++)
    		cout<<ans[i]<<" ";

    	cout<<endl;
    }

    return 0;
}


#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long int ull;
typedef pair<ll,ll> pii;
typedef tuple<ll,ll,ll> tii;
typedef vector<ll> vi;
typedef vector<pii> vii;
typedef map<ll,ll> mi;
typedef map<pii,ll> mii;

#define endl "\n"
#define pb push_back
#define sq(a) (a)*(a)
#define rep(i,a,b) for(int i = a; i < b; i++)
#define mod 1000000007
#define PI 3.141592653589793238

#define IOS ios_base::sync_with_stdio(false);cin.tie(NULL);

ll gcd(ll a, ll b)
{
    if (b == 0)
        return a;
    return gcd(b, a % b);
}

ll exp(ll x,ll n)
{
    ll result=1;
    while(n>0)
    {
        if(n % 2 ==1)
            result=(result * x)%mod;
        x=(x*x)%mod;
        n=n/2;
    }
    return result;
}

int32_t main()
{
    #ifndef ONLINE_JUDGE
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
    #endif

    IOS

    int t;
    cin>>t;
    while(t--)
    {
    	int n,k;
    	cin>>n>>k;
    	int a[n];
    	unordered_map<string,int> mp;
    	int temp=1;
    	for(int i=0;i<n;i++)
    	{
    		cin>>a[i];
    		mp[to_string(a[i])]++;
    		temp=max(temp,mp[to_string(a[i])]);
    	}

    	if(k==n)
    	{
    		cout<<n<<endl;
    		for(int i=0;i<n;i++){
    			cout<<a[i];

    		if(i!=n-1) cout<<" ";
    		}
    		cout<<endl;
    		continue;
    	}

    	if(mp.size()>k)
    	{
    		cout<<-1<<endl;
    		continue;
    	}

    	string ans,p;

    	for(auto x : mp)
    	{
    		p+= x.first + " ";
    	}

    	for(int i=0;i<k-mp.size();i++)
    	{
    		p+=to_string(a[0])+" ";
    	}

    	for(int i=0;i<n;i++)
    	{
    		ans+=p;
    	}
    	ans.pop_back();

    	cout<<ans.size()<<endl;
    	cout<<ans<<endl;

    	// for(int i=0;i<ans.length();i++)
    	// 	cout<<ans[i]<<" ";

    }

    return 0;
}


#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long int ull;
typedef pair<ll,ll> pii;
typedef tuple<ll,ll,ll> tii;
typedef vector<ll> vi;
typedef vector<pii> vii;
typedef map<ll,ll> mi;
typedef map<pii,ll> mii;

#define endl "\n"
#define pb push_back
#define sq(a) (a)*(a)
#define rep(i,a,b) for(int i = a; i < b; i++)
#define mod 1000000007
#define PI 3.141592653589793238

#define IOS ios_base::sync_with_stdio(false);cin.tie(NULL);

ll gcd(ll a, ll b)
{
    if (b == 0)
        return a;
    return gcd(b, a % b);
}

ll exp(ll x,ll n)
{
    ll result=1;
    while(n>0)
    {
        if(n % 2 ==1)
            result=(result * x)%mod;
        x=(x*x)%mod;
        n=n/2;
    }
    return result;
}

int32_t main()
{
    #ifndef ONLINE_JUDGE
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
    #endif

    IOS

    int t;
    cin>>t;
    while(t--)
    {
    	int n,k;;
        cin>>n>>k;
        unordered_set<int> s;
        int a[n];
        for(int i=0;i<n;i++)
        {
            cin>>a[i];
            s.insert(a[i]);
        }

        if(s.size()>k)
        {
            cout<<-1<<endl;
            continue;
        }

        cout<<n*k<<endl;

        auto itr=s.begin();
        int rep=*itr;

        for(int i=0;i<n;i++)
        {
            for(auto x:s)
                cout<<x<<" ";

            for(int j=0;j<k-s.size();j++)
                cout<<rep<<" ";
        }

        cout<<endl;
    }

    return 0;
}


#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long int ull;
typedef pair<ll,ll> pii;
typedef tuple<ll,ll,ll> tii;
typedef vector<ll> vi;
typedef vector<pii> vii;
typedef map<ll,ll> mi;
typedef map<pii,ll> mii;

#define endl "\n"
#define pb push_back
#define sq(a) (a)*(a)
#define rep(i,a,b) for(int i = a; i < b; i++)
#define mod 1000000007
#define PI 3.141592653589793238

#define IOS ios_base::sync_with_stdio(false);cin.tie(NULL);

ll gcd(ll a, ll b)
{
    if (b == 0)
        return a;
    return gcd(b, a % b);
}

ll exp(ll x,ll n)
{
    ll result=1;
    while(n>0)
    {
        if(n % 2 ==1)
            result=(result * x)%mod;
        x=(x*x)%mod;
        n=n/2;
    }
    return result;
}

int32_t main()
{
    #ifndef ONLINE_JUDGE
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
    #endif

    IOS

    int t;
    cin>>t;
    while(t--)
    {
    	int n,k;
    	cin>>n>>k;
    	int a[n];
    	unordered_map<int,int> mp;
    	int temp=1;
    	for(int i=0;i<n;i++)
    	{
    		cin>>a[i];
    		mp[a[i]]++;
    		temp=max(temp,mp[a[i]]);
    	}

    	if(k==n)
    	{
    		cout<<n<<endl;
    		for(int i=0;i<n;i++)
    			cout<<a[i]<<" ";
    		cout<<endl;
    		continue;
    	}

    	if(mp.size()>k)
    	{
    		cout<<-1<<endl;
    		continue;
    	}

    	string ans,p;

    	for(auto x : mp)
    	{
    		p+='0'+ x.first;
    	}

    	char c='0'+ min(n,9);

    	for(int i=0;i<k-mp.size();i++)
    	{
    		p+=c;
    	}

    	for(int i=0;i<n;i++)
    	{
    		ans+=p;
    	}

    	cout<<ans.size()<<endl;

    	for(int i=0;i<ans.length();i++)
    		cout<<ans[i]<<" ";

    	cout<<endl;
    }

    return 0;
}


#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long int ull;
typedef pair<ll,ll> pii;
typedef tuple<ll,ll,ll> tii;
typedef vector<ll> vi;
typedef vector<pii> vii;
typedef map<ll,ll> mi;
typedef map<pii,ll> mii;

#define endl "\n"
#define pb push_back
#define sq(a) (a)*(a)
#define rep(i,a,b) for(int i = a; i < b; i++)
#define mod 1000000007
#define PI 3.141592653589793238

#define IOS ios_base::sync_with_stdio(false);cin.tie(NULL);

ll gcd(ll a, ll b)
{
    if (b == 0)
        return a;
    return gcd(b, a % b);
}

ll exp(ll x,ll n)
{
    ll result=1;
    while(n>0)
    {
        if(n % 2 ==1)
            result=(result * x)%mod;
        x=(x*x)%mod;
        n=n/2;
    }
    return result;
}

int32_t main()
{
    #ifndef ONLINE_JUDGE
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
    #endif

    IOS

    int t;
    cin>>t;
    while(t--)
    {
    	int n,k;
    	cin>>n>>k;
    	int a[n];
    	map<int,int> mp;
    	int temp=1;
    	for(int i=0;i<n;i++)
    	{
    		cin>>a[i];
    		mp[a[i]]++;
    		temp=max(temp,mp[a[i]]);
    	}

    	if(mp.size()>k)
    	{
    		cout<<-1<<endl;
    		continue;
    	}

    	string ans,p;

    	for(auto x : mp)
    	{
    		p+='0'+ x.first;
    	}

    	char c=p[p.length()-1];

    	for(int i=0;i<k-mp.size();i++)
    	{
    		p+=c;
    	}

    	for(int i=0;i<temp+1;i++)
    	{
    		ans+=p;
    	}

    	cout<<ans.size()<<endl;
    	for(int i=0;i<ans.length();i++)
    		cout<<ans[i]<<" ";
    	cout<<endl;
    }

    return 0;
}


#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long int ull;
typedef pair<ll,ll> pii;
typedef tuple<ll,ll,ll> tii;
typedef vector<ll> vi;
typedef vector<pii> vii;
typedef map<ll,ll> mi;
typedef map<pii,ll> mii;

#define endl "\n"
#define pb push_back
#define sq(a) (a)*(a)
#define rep(i,a,b) for(int i = a; i < b; i++)
#define mod 1000000007
#define PI 3.141592653589793238

#define IOS ios_base::sync_with_stdio(false);cin.tie(NULL);

ll gcd(ll a, ll b)
{
    if (b == 0)
        return a;
    return gcd(b, a % b);
}

ll exp(ll x,ll n)
{
    ll result=1;
    while(n>0)
    {
        if(n % 2 ==1)
            result=(result * x)%mod;
        x=(x*x)%mod;
        n=n/2;
    }
    return result;
}

int32_t main()
{
    #ifndef ONLINE_JUDGE
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
    #endif

    IOS

    int t;
    cin>>t;
    while(t--)
    {
    	int n,k;
    	cin>>n>>k;
    	int a[n];
    	unordered_map<int,int> mp;
    	int temp=1;
    	for(int i=0;i<n;i++)
    	{
    		cin>>a[i];
    		mp[a[i]]++;
    		temp=max(temp,mp[a[i]]);
    	}

    	if(k==n)
    	{
    		cout<<n<<endl;
    		for(int i=0;i<n;i++)
    			cout<<a[i]<<" ";
    		cout<<endl;
    		continue;
    	}

    	if(mp.size()>k)
    	{
    		cout<<-1<<endl;
    		continue;
    	}

    	string ans,p;

    	for(auto x : mp)
    	{
    		p+='0'+ x.first;
    	}

    	char c=p[p.length()-1];

    	for(int i=0;i<k-mp.size();i++)
    	{
    		p+=c;
    	}

    	for(int i=0;i<n;i++)
    	{
    		ans+=p;
    	}

    	cout<<ans.size()<<endl;

    	for(int i=0;i<ans.length();i++)
    		cout<<ans[i]<<" ";

    	cout<<endl;
    }

    return 0;
}


#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long int ull;
typedef pair<ll,ll> pii;
typedef tuple<ll,ll,ll> tii;
typedef vector<ll> vi;
typedef vector<pii> vii;
typedef map<ll,ll> mi;
typedef map<pii,ll> mii;

#define endl "\n"
#define pb push_back
#define sq(a) (a)*(a)
#define rep(i,a,b) for(int i = a; i < b; i++)
#define mod 1000000007
#define PI 3.1415926

#define IOS ios_base::sync_with_stdio(false);cin.tie(NULL);

ll gcd(ll a, ll b)
{
    if (b == 0)
        return a;
    return gcd(b, a % b);
}

ll exp(ll x,ll n)
{
    ll result=1;
    while(n>0)
    {
        if(n % 2 ==1)
            result=(result * x)%mod;
        x=(x*x)%mod;
        n=n/2;
    }
    return result;
}

int32_t main()
{
    #ifndef ONLINE_JUDGE
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
    #endif

    IOS

    int t;
    cin>>t;
    while(t--)
    {
    	int n,k;;
        cin>>n>>k;
        unordered_set<int> s;
        int a[n];
        for(int i=0;i<n;i++)
        {
            cin>>a[i];
            s.insert(a[i]);
        }

        if(s.size()>k)
        {
            cout<<-1<<endl;
            continue;
        }

        cout<<n*s.size()<<endl;

        auto itr=s.begin();
        int rep=*itr;

        for(int i=0;i<n;i++)
        {
            for(auto x:s)
                cout<<x<<" ";

            for(int j=0;j<k-s.size();j++)
                cout<<rep<<" ";
        }

        cout<<endl;
    }

    return 0;
}


#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long int ull;
typedef pair<ll,ll> pii;
typedef tuple<ll,ll,ll> tii;
typedef vector<ll> vi;
typedef vector<pii> vii;
typedef map<ll,ll> mi;
typedef map<pii,ll> mii;

#define endl "\n"
#define pb push_back
#define sq(a) (a)*(a)
#define rep(i,a,b) for(int i = a; i < b; i++)
#define mod 1000000007
#define PI 3.141592653589793238

#define IOS ios_base::sync_with_stdio(false);cin.tie(NULL);

ll gcd(ll a, ll b)
{
    if (b == 0)
        return a;
    return gcd(b, a % b);
}

ll exp(ll x,ll n)
{
    ll result=1;
    while(n>0)
    {
        if(n % 2 ==1)
            result=(result * x)%mod;
        x=(x*x)%mod;
        n=n/2;
    }
    return result;
}

int32_t main()
{
    #ifndef ONLINE_JUDGE
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
    #endif

    IOS

    int t;
    cin>>t;
    while(t--)
    {
    	int n,k;
    	cin>>n>>k;
    	int a[n];
    	unordered_map<string,int> mp;
    	int temp=1;
    	for(int i=0;i<n;i++)
    	{
    		cin>>a[i];
    		mp[to_string(a[i])]++;
    		temp=max(temp,mp[to_string(a[i])]);
    	}

    	if(k==n)
    	{
    		cout<<n<<endl;
    		for(int i=0;i<n;i++)
    			cout<<a[i]<<" ";
    		cout<<endl;
    		continue;
    	}

    	if(mp.size()>k)
    	{
    		cout<<-1<<endl;
    		continue;
    	}

    	string ans,p;

    	for(auto x : mp)
    	{
    		p+= x.first + " ";
    	}

    	for(int i=0;i<k-mp.size();i++)
    	{
    		p+=to_string(a[0])+" ";
    	}

    	for(int i=0;i<n;i++)
    	{
    		ans+=p;
    	}
    	ans.pop_back();

    	cout<<ans.size()<<endl;
    	cout<<ans;

    	// for(int i=0;i<ans.length();i++)
    	// 	cout<<ans[i]<<" ";

    	cout<<endl;
    }

    return 0;
}


#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long int ull;
typedef pair<ll,ll> pii;
typedef tuple<ll,ll,ll> tii;
typedef vector<ll> vi;
typedef vector<pii> vii;
typedef map<ll,ll> mi;
typedef map<pii,ll> mii;

#define endl "\n"
#define pb push_back
#define sq(a) (a)*(a)
#define rep(i,a,b) for(int i = a; i < b; i++)
#define mod 1000000007
#define PI 3.141592653589793238

#define IOS ios_base::sync_with_stdio(false);cin.tie(NULL);

ll gcd(ll a, ll b)
{
    if (b == 0)
        return a;
    return gcd(b, a % b);
}

ll exp(ll x,ll n)
{
    ll result=1;
    while(n>0)
    {
        if(n % 2 ==1)
            result=(result * x)%mod;
        x=(x*x)%mod;
        n=n/2;
    }
    return result;
}

int32_t main()
{
    #ifndef ONLINE_JUDGE
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
    #endif

    IOS

    int t;
    cin>>t;
    while(t--)
    {
    	int n,k;;
        cin>>n>>k;
        unordered_set<int> s;
        int a[n];
        for(int i=0;i<n;i++)
        {
            cin>>a[i];
            s.insert(a[i]);
        }

        if(s.size()>k)
        {
            cout<<-1<<endl;
            continue;
        }

        cout<<n*s.size()<<endl;

        auto itr=s.begin();
        int rep=*itr;

        for(int i=0;i<n;i++)
        {
            for(auto x:s)
                cout<<x<<" ";

            for(int j=0;j<k-s.size();j++)
                cout<<rep<<" ";
        }

        cout<<endl;
    }

    return 0;
}


#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long int ull;
typedef pair<ll,ll> pii;
typedef tuple<ll,ll,ll> tii;
typedef vector<ll> vi;
typedef vector<pii> vii;
typedef map<ll,ll> mi;
typedef map<pii,ll> mii;

#define endl "\n"
#define pb push_back
#define sq(a) (a)*(a)
#define rep(i,a,b) for(int i = a; i < b; i++)
#define mod 1000000007
#define PI 3.141592653589793238

#define IOS ios_base::sync_with_stdio(false);cin.tie(NULL);

ll gcd(ll a, ll b)
{
    if (b == 0)
        return a;
    return gcd(b, a % b);
}

ll exp(ll x,ll n)
{
    ll result=1;
    while(n>0)
    {
        if(n % 2 ==1)
            result=(result * x)%mod;
        x=(x*x)%mod;
        n=n/2;
    }
    return result;
}

int32_t main()
{
    #ifndef ONLINE_JUDGE
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
    #endif

    IOS

    int t;
    cin>>t;
    while(t--)
    {
    	int n,k;;
        cin>>n>>k;
        unordered_set<int> s;
        int a[n];
        for(int i=0;i<n;i++)
        {
            cin>>a[i];
            s.insert(a[i]);
        }

        cout<<n*s.size()<<endl;

        for(int i=0;i<n;i++)
        {
            for(auto x:s)
            {
                cout<<x<<" ";
            }
        }

        cout<<endl;
    }

    return 0;
}


#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long int ull;
typedef pair<ll,ll> pii;
typedef tuple<ll,ll,ll> tii;
typedef vector<ll> vi;
typedef vector<pii> vii;
typedef map<ll,ll> mi;
typedef map<pii,ll> mii;

#define endl "\n"
#define pb push_back
#define sq(a) (a)*(a)
#define rep(i,a,b) for(int i = a; i < b; i++)
#define mod 1000000007
#define PI 3.141592653589793238

#define IOS ios_base::sync_with_stdio(false);cin.tie(NULL);

ll gcd(ll a, ll b)
{
    if (b == 0)
        return a;
    return gcd(b, a % b);
}

ll exp(ll x,ll n)
{
    ll result=1;
    while(n>0)
    {
        if(n % 2 ==1)
            result=(result * x)%mod;
        x=(x*x)%mod;
        n=n/2;
    }
    return result;
}

int32_t main()
{
    #ifndef ONLINE_JUDGE
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
    #endif

    IOS

    int t;
    cin>>t;
    while(t--)
    {
    	int n,k;
    	cin>>n>>k;
    	int a[n];
    	unordered_map<int,int> mp;
    	int temp=1;
    	for(int i=0;i<n;i++)
    	{
    		cin>>a[i];
    		mp[a[i]]++;
    		temp=max(temp,mp[a[i]]);
    	}

    	if(k==n)
    	{
    		for(int i=0;i<n;i++)
    			cout<<a[i]<<" ";
    		cout<<endl;
    		continue;
    	}

    	if(mp.size()>k)
    	{
    		cout<<-1<<endl;
    		continue;
    	}

    	string ans,p;

    	for(auto x : mp)
    	{
    		p+='0'+ x.first;
    	}

    	char c=p[p.length()-1];

    	for(int i=0;i<k-mp.size();i++)
    	{
    		p+=c;
    	}

    	for(int i=0;i<n;i++)
    	{
    		ans+=p;
    	}

    	cout<<ans.size()<<endl;

    	for(int i=0;i<ans.length();i++)
    		cout<<ans[i]<<" ";

    	cout<<endl;
    }

    return 0;
}


#include<bits/stdc++.h>
#include<set>
#include<iterator>
#include<algorithm>
using namespace std;
#define forr(a,n) for(int i=a;i<=n;i++)
#define MAX 1000000007LL
#define mod 998244353
#define forn(n,a) for(int i=n;i>=a;i--)
#define all(x) x.begin() , x.end()
#define mp(x,y) make_pair(x,y)
#define pb(x) push_back(x)
#define pii pair<int,int>
#define ll long long
const int N = (int)1e5 + 9;
ll power(ll x,ll y)
{
    if(y == 0)
        return 1;
    ll temp = power(x,y/2);
    if(y%2 == 1)
        return temp*temp*x;
    else
        return temp*temp;
}

void solve()
{
    int n,k;
    cin>>n>>k;
    vector<int> a(n) , b;
    set<int> s;

    forr(0,n-1)
    {
        cin>>a[i];
        s.insert(a[i]);
    }

    if(s.size() > k)
    {
        cout<<"-1\n";
        return;
    }

    cout<<n*n<<"\n";
    for(int i=0;i<n;i++)
    {
        for(int j=1;j<=k;j++)
            cout<<j<<" ";
    }
    cout<<"\n";
}

int main()
{
    #ifndef ONLINE_JUDGE
    freopen("in.txt" , "r" , stdin);
    freopen("output.txt" , "w" , stdout);
    #endif
    ios_base::sync_with_stdio(false);
	cin.tie(NULL);

    int t;
    cin>>t;
    while(t--)
    {
        solve();
    }

    return 0;
}


#include<bits/stdc++.h>
#include<set>
#include<iterator>
#include<algorithm>
using namespace std;
#define forr(a,n) for(int i=a;i<=n;i++)
#define MAX 1000000007LL
#define mod 998244353
#define forn(n,a) for(int i=n;i>=a;i--)
#define all(x) x.begin() , x.end()
#define mp(x,y) make_pair(x,y)
#define pb(x) push_back(x)
#define pii pair<int,int>
#define ll long long
const int N = (int)1e5 + 9;
ll power(ll x,ll y)
{
    if(y == 0)
        return 1;
    ll temp = power(x,y/2);
    if(y%2 == 1)
        return temp*temp*x;
    else
        return temp*temp;
}

void solve()
{
    int n,k;
    cin>>n>>k;
    set<int> s;
    vector<int> a(n),b;

    forr(0,n-1)
    {
        cin>>a[i];
        s.insert(a[i]);
    }

    for(auto i : s)
        b.pb(i);

    if(s.size() > k)
    {
        cout<<"-1\n";
        return;
    }

    int sz = k;
    vector<int> c;

    forr(0,k-1)
        c.pb(a[i]);

    int j = 0;
    for(int i=k;i<n;)
    {
        if(c[j] == a[i])
        {
            c.pb(c[j]);
            i++;
        }
        else
            c.pb(c[j]);
        j = (j + 1)%k;
    }

    cout<<sz<<"\n";
    for(auto i : c)
        cout<<i<<" ";
    cout<<"\n";
}

int main()
{
    #ifndef ONLINE_JUDGE
    freopen("in.txt" , "r" , stdin);
    freopen("output.txt" , "w" , stdout);
    #endif
    ios_base::sync_with_stdio(false);
	cin.tie(NULL);

    int t;
    cin>>t;
    while(t--)
    {
        solve();
    }

    return 0;
}


#include<bits/stdc++.h>
#include<set>
#include<iterator>
#include<algorithm>
using namespace std;
#define forr(a,n) for(int i=a;i<=n;i++)
#define MAX 1000000007LL
#define mod 998244353
#define forn(n,a) for(int i=n;i>=a;i--)
#define all(x) x.begin() , x.end()
#define mp(x,y) make_pair(x,y)
#define pb(x) push_back(x)
#define pii pair<int,int>
#define ll long long
const int N = (int)1e5 + 9;
ll power(ll x,ll y)
{
    if(y == 0)
        return 1;
    ll temp = power(x,y/2);
    if(y%2 == 1)
        return temp*temp*x;
    else
        return temp*temp;
}

void solve()
{
    int n,k;
    cin>>n>>k;
    // set<int> s;
    vector<int> a(n);
    map<int,int> m;
    int maxi = 0;

    forr(0,n-1)
    {
        cin>>a[i];
        // s.insert(a[i]);
        m[a[i]]++;
        maxi = max(maxi , m[a[i]]);
    }

    if(m.size() > k)
    {
        cout<<"-1\n";
        return;
    }

    vector<int> c;
    for(auto i : m)
        c.pb(i.first);

    int j = 1;
    while(c.size() != k)
    {
        // if(m[j] == 0)
        c.pb(j);
        j++;
    }

    j = 0;
    // cout<<c.size()*maxi<<"\n";
    int sz = 0;

    for(int i=0;i<n;)
    {
        int v = c[j];
        if(a[i] == v)
            i++;
        // cout<<v<<" ";
        sz++;
        j = (j + 1)%c.size();
    }

    cout<<sz<<"\n";

    for(int i=0;i<n;)
    {
        int v = c[j];
        if(a[i] == v)
            i++;
        cout<<v<<" ";
        // sz++;
        j = (j + 1)%c.size();
    }
    cout<<"\n";
}

int main()
{
    #ifndef ONLINE_JUDGE
    freopen("in.txt" , "r" , stdin);
    freopen("output.txt" , "w" , stdout);
    #endif
    ios_base::sync_with_stdio(false);
	cin.tie(NULL);

    int t;
    cin>>t;
    while(t--)
    {
        solve();
    }

    return 0;
}


#include<bits/stdc++.h>
#include<set>
#include<iterator>
#include<algorithm>
using namespace std;
#define forr(a,n) for(int i=a;i<=n;i++)
#define MAX 1000000007LL
#define mod 998244353
#define forn(n,a) for(int i=n;i>=a;i--)
#define all(x) x.begin() , x.end()
#define mp(x,y) make_pair(x,y)
#define pb(x) push_back(x)
#define pii pair<int,int>
#define ll long long
const int N = (int)1e5 + 9;
ll power(ll x,ll y)
{
    if(y == 0)
        return 1;
    ll temp = power(x,y/2);
    if(y%2 == 1)
        return temp*temp*x;
    else
        return temp*temp;
}

void solve()
{
    int n,k;
    cin>>n>>k;
    set<int> s;
    vector<int> a(n),b;

    forr(0,n-1)
    {
        cin>>a[i];
        s.insert(a[i]);
    }

    for(auto i : s)
        b.pb(i);

    if(s.size() > k)
    {
        cout<<"-1\n";
        return;
    }

    int sz = k;
    vector<int> c;

    forr(0,k-1)
        c.pb(a[i]);

    int j = 0;
    for(int i=k;i<n;)
    {
        if(c[j] == a[i])
        {
            c.pb(c[j]);
            i++;
        }
        else
            c.pb(c[j]);
        j = (j + 1)%k;
        sz++;
    }

    cout<<sz<<"\n";
    for(auto i : c)
        cout<<i<<" ";
    cout<<"\n";
}

int main()
{
    #ifndef ONLINE_JUDGE
    freopen("in.txt" , "r" , stdin);
    freopen("output.txt" , "w" , stdout);
    #endif
    ios_base::sync_with_stdio(false);
	cin.tie(NULL);

    int t;
    cin>>t;
    while(t--)
    {
        solve();
    }

    return 0;
}


#include<bits/stdc++.h>
#include<set>
#include<iterator>
#include<algorithm>
using namespace std;
#define forr(a,n) for(int i=a;i<=n;i++)
#define MAX 1000000007LL
#define mod 998244353
#define forn(n,a) for(int i=n;i>=a;i--)
#define all(x) x.begin() , x.end()
#define mp(x,y) make_pair(x,y)
#define pb(x) push_back(x)
#define pii pair<int,int>
#define ll long long
const int N = (int)1e5 + 9;
ll power(ll x,ll y)
{
    if(y == 0)
        return 1;
    ll temp = power(x,y/2);
    if(y%2 == 1)
        return temp*temp*x;
    else
        return temp*temp;
}

void solve()
{
    int n,k;
    cin>>n>>k;
    // set<int> s;
    vector<int> a(n);
    map<int,int> m;
    int maxi = 0;

    forr(0,n-1)
    {
        cin>>a[i];
        // s.insert(a[i]);
        m[a[i]]++;
        maxi = max(maxi , m[a[i]]);
    }

    if(m.size() > k)
    {
        cout<<"-1\n";
        return;
    }

    vector<int> c;
    for(auto i : m)
        c.pb(i.first);

    int j = 1;
    while(c.size() != k)
    {
        if(m[j] == 0)
            c.pb(j);
        j++;
    }

    j = 0;
    cout<<c.size()*maxi + 1<<"\n";

    for(int i=0;i<n;)
    {
        int v = c[j];
        if(a[i] == v)
            i++;
        cout<<v<<" ";
        j = (j + 1)%c.size();
    }

    cout<<"\n";
}

int main()
{
    #ifndef ONLINE_JUDGE
    freopen("in.txt" , "r" , stdin);
    freopen("output.txt" , "w" , stdout);
    #endif
    ios_base::sync_with_stdio(false);
	cin.tie(NULL);

    int t;
    cin>>t;
    while(t--)
    {
        solve();
    }

    return 0;
}


#include<bits/stdc++.h>
#include<set>
#include<iterator>
#include<algorithm>
using namespace std;
#define forr(a,n) for(int i=a;i<=n;i++)
#define MAX 1000000007LL
#define mod 998244353
#define forn(n,a) for(int i=n;i>=a;i--)
#define all(x) x.begin() , x.end()
#define mp(x,y) make_pair(x,y)
#define pb(x) push_back(x)
#define pii pair<int,int>
#define ll long long
const int N = (int)1e5 + 9;
ll power(ll x,ll y)
{
    if(y == 0)
        return 1;
    ll temp = power(x,y/2);
    if(y%2 == 1)
        return temp*temp*x;
    else
        return temp*temp;
}

void solve()
{
    int n,k;
    cin>>n>>k;
    vector<int> a(n) , b;
    set<int> s;

    forr(0,n-1)
    {
        cin>>a[i];
        s.insert(a[i]);
    }

    if(s.size() > k)
    {
        cout<<"-1\n";
        return;
    }

    cout<<n*k<<"\n";
    for(int i=0;i<n;i++)
    {
        for(int j=1;j<=k;j++)
            cout<<j<<" ";
    }
    cout<<"\n";
}

int main()
{
    #ifndef ONLINE_JUDGE
    freopen("in.txt" , "r" , stdin);
    freopen("output.txt" , "w" , stdout);
    #endif
    ios_base::sync_with_stdio(false);
	cin.tie(NULL);

    int t;
    cin>>t;
    while(t--)
    {
        solve();
    }

    return 0;
}


#include<bits/stdc++.h>
#include<set>
#include<iterator>
#include<algorithm>
using namespace std;
#define forr(a,n) for(int i=a;i<=n;i++)
#define MAX 1000000007LL
#define mod 998244353
#define forn(n,a) for(int i=n;i>=a;i--)
#define all(x) x.begin() , x.end()
#define mp(x,y) make_pair(x,y)
#define pb(x) push_back(x)
#define pii pair<int,int>
#define ll long long
const int N = (int)1e5 + 9;
ll power(ll x,ll y)
{
    if(y == 0)
        return 1;
    ll temp = power(x,y/2);
    if(y%2 == 1)
        return temp*temp*x;
    else
        return temp*temp;
}

void solve()
{
    int n,k;
    cin>>n>>k;
    // set<int> s;
    vector<int> a(n);
    map<int,int> m;
    int maxi = 0;

    forr(0,n-1)
    {
        cin>>a[i];
        // s.insert(a[i]);
        m[a[i]]++;
        maxi = max(maxi , m[a[i]]);
    }

    if(m.size() > k)
    {
        cout<<"-1\n";
        return;
    }

    int j = 0;
    cout<<maxi*n<<"\n";
    for(int i=0;i<n;)
    {
        int v = j+1;
        if(a[i] == v)
            i++;
        cout<<v<<" ";
        j = (j + 1)%n;
    }

    cout<<"\n";
}

int main()
{
    #ifndef ONLINE_JUDGE
    freopen("in.txt" , "r" , stdin);
    freopen("output.txt" , "w" , stdout);
    #endif
    ios_base::sync_with_stdio(false);
	cin.tie(NULL);

    int t;
    cin>>t;
    while(t--)
    {
        solve();
    }

    return 0;
}


#include<bits/stdc++.h>
#include<set>
#include<iterator>
#include<algorithm>
using namespace std;
#define forr(a,n) for(int i=a;i<=n;i++)
#define MAX 1000000007LL
#define mod 998244353
#define forn(n,a) for(int i=n;i>=a;i--)
#define all(x) x.begin() , x.end()
#define mp(x,y) make_pair(x,y)
#define pb(x) push_back(x)
#define pii pair<int,int>
#define ll long long
const int N = (int)1e5 + 9;
ll power(ll x,ll y)
{
    if(y == 0)
        return 1;
    ll temp = power(x,y/2);
    if(y%2 == 1)
        return temp*temp*x;
    else
        return temp*temp;
}

void solve()
{
    int n,k;
    cin>>n>>k;
    // set<int> s;
    vector<int> a(n);
    map<int,int> m;
    int maxi = 0;

    forr(0,n-1)
    {
        cin>>a[i];
        // s.insert(a[i]);
        m[a[i]]++;
        maxi = max(maxi , m[a[i]]);
    }

    if(m.size() > k)
    {
        cout<<"-1\n";
        return;
    }

    vector<int> c;
    for(auto i : m)
        c.pb(i.first);

    int j = 1;
    while(c.size() != k)
    {
        // if(m[j] == 0)
        c.pb(j);
        j++;
    }

    j = 0;
    cout<<c.size()*maxi<<"\n";

    for(int i=0;i<n;)
    {
        int v = c[j];
        if(a[i] == v)
            i++;
        cout<<v<<" ";
        j = (j + 1)%c.size();
    }

    cout<<"\n";
}

int main()
{
    #ifndef ONLINE_JUDGE
    freopen("in.txt" , "r" , stdin);
    freopen("output.txt" , "w" , stdout);
    #endif
    ios_base::sync_with_stdio(false);
	cin.tie(NULL);

    int t;
    cin>>t;
    while(t--)
    {
        solve();
    }

    return 0;
}


#include<bits/stdc++.h>
#include<set>
#include<iterator>
#include<algorithm>
using namespace std;
#define forr(a,n) for(int i=a;i<=n;i++)
#define MAX 1000000007LL
#define mod 998244353
#define forn(n,a) for(int i=n;i>=a;i--)
#define all(x) x.begin() , x.end()
#define mp(x,y) make_pair(x,y)
#define pb(x) push_back(x)
#define pii pair<int,int>
#define ll long long
const int N = (int)1e5 + 9;
ll power(ll x,ll y)
{
    if(y == 0)
        return 1;
    ll temp = power(x,y/2);
    if(y%2 == 1)
        return temp*temp*x;
    else
        return temp*temp;
}

void solve()
{
    int n,k;
    cin>>n>>k;
    vector<int> a(n);
    set<int> s;

    forr(0,n-1)
    {
        cin>>a[i];
        s.insert(a[i]);
    }

    if(s.size() > k)
    {
        cout<<"-1\n";
        return;
    }

    int sz = 0;
    int j = 0;
    for(int i=0;i<n;)
    {
        if(a[i] == j+1)
            i++;
        sz++;
        j = (j+1)%n;
    }
    cout<<sz<<"\n";

    j = 0;
    for(int i=0;i<n;)
    {
        if(a[i] == j+1)
            i++;
        cout<<j+1<<" ";
        j = (j+1)%n;
    }

    cout<<"\n";

}

int main()
{
    #ifndef ONLINE_JUDGE
    freopen("in.txt" , "r" , stdin);
    freopen("output.txt" , "w" , stdout);
    #endif
    ios_base::sync_with_stdio(false);
	cin.tie(NULL);

    int t;
    cin>>t;
    while(t--)
    {
        solve();
    }

    return 0;
}


#include<bits/stdc++.h>
#include<set>
#include<iterator>
#include<algorithm>
using namespace std;
#define forr(a,n) for(int i=a;i<=n;i++)
#define MAX 1000000007LL
#define mod 998244353
#define forn(n,a) for(int i=n;i>=a;i--)
#define all(x) x.begin() , x.end()
#define mp(x,y) make_pair(x,y)
#define pb(x) push_back(x)
#define pii pair<int,int>
#define ll long long
const int N = (int)1e5 + 9;
ll power(ll x,ll y)
{
    if(y == 0)
        return 1;
    ll temp = power(x,y/2);
    if(y%2 == 1)
        return temp*temp*x;
    else
        return temp*temp;
}

void solve()
{
    int n,k;
    cin>>n>>k;
    // set<int> s;
    vector<int> a(n);
    map<int,int> m;
    int maxi = 0;

    forr(0,n-1)
    {
        cin>>a[i];
        // s.insert(a[i]);
        m[a[i]]++;
        maxi = max(maxi , m[a[i]]);
    }

    if(m.size() > k)
    {
        cout<<"-1\n";
        return;
    }

    vector<int> c;
    for(auto i : m)
        c.pb(i.first);

    int j = 1;
    while(c.size() != k)
    {
        // if(m[j] == 0)
        c.pb(j);
        j++;
    }

    j = 0;
    cout<<c.size()*maxi + 1<<"\n";

    for(int i=0;i<n;)
    {
        int v = c[j];
        if(a[i] == v)
            i++;
        cout<<v<<" ";
        j = (j + 1)%c.size();
    }

    cout<<"\n";
}

int main()
{
    #ifndef ONLINE_JUDGE
    freopen("in.txt" , "r" , stdin);
    freopen("output.txt" , "w" , stdout);
    #endif
    ios_base::sync_with_stdio(false);
	cin.tie(NULL);

    int t;
    cin>>t;
    while(t--)
    {
        solve();
    }

    return 0;
}


#include<bits/stdc++.h>
#include<set>
#include<iterator>
#include<algorithm>
using namespace std;
#define forr(a,n) for(int i=a;i<=n;i++)
#define MAX 1000000007LL
#define mod 998244353
#define forn(n,a) for(int i=n;i>=a;i--)
#define all(x) x.begin() , x.end()
#define mp(x,y) make_pair(x,y)
#define pb(x) push_back(x)
#define pii pair<int,int>
#define ll long long
const int N = (int)1e5 + 9;
ll power(ll x,ll y)
{
    if(y == 0)
        return 1;
    ll temp = power(x,y/2);
    if(y%2 == 1)
        return temp*temp*x;
    else
        return temp*temp;
}

void solve()
{
    int n,k;
    cin>>n>>k;
    vector<int> a(n);
    set<int> s;

    forr(0,n-1)
    {
        cin>>a[i];
        s.insert(a[i]);
    }

    if(s.size() > k)
    {
        cout<<"-1\n";
        return;
    }

    int sz = 0;
    int j = 0;
    for(int i=0;i<n;)
    {
        if(a[i] == j+1)
            i++;
        sz++;
        j = (j+1)%k;
    }
    cout<<sz<<"\n";

    j = 0;
    for(int i=0;i<n;)
    {
        if(a[i] == j+1)
            i++;
        cout<<j+1<<" ";
        j = (j+1)%k;
    }

    cout<<"\n";

}

int main()
{
    #ifndef ONLINE_JUDGE
    freopen("in.txt" , "r" , stdin);
    freopen("output.txt" , "w" , stdout);
    #endif
    ios_base::sync_with_stdio(false);
	cin.tie(NULL);

    int t;
    cin>>t;
    while(t--)
    {
        solve();
    }

    return 0;
}


#include<bits/stdc++.h>
#include<set>
#include<iterator>
#include<algorithm>
using namespace std;
#define forr(a,n) for(int i=a;i<=n;i++)
#define MAX 1000000007LL
#define mod 998244353
#define forn(n,a) for(int i=n;i>=a;i--)
#define all(x) x.begin() , x.end()
#define mp(x,y) make_pair(x,y)
#define pb(x) push_back(x)
#define pii pair<int,int>
#define ll long long
const int N = (int)1e5 + 9;
ll power(ll x,ll y)
{
    if(y == 0)
        return 1;
    ll temp = power(x,y/2);
    if(y%2 == 1)
        return temp*temp*x;
    else
        return temp*temp;
}

void solve()
{
    int n,k;
    cin>>n>>k;
    set<int> s;
    vector<int> a(n);

    forr(0,n-1)
    {
        cin>>a[i];
        s.insert(a[i]);
    }

    if(s.size() > k)
    {
        cout<<"-1\n";
        return;
    }

    int sz = k;
    vector<int> c;

    forr(0,k-1)
        c.pb(a[i]);

    int j = 0;
    for(int i=k;i<n;)
    {
        if(c[j] == a[i])
        {
            c.pb(c[j]);
            i++;
        }
        else
            c.pb(c[j]);
        j = (j + 1)%k;
        sz++;
    }

    cout<<sz<<"\n";
    for(auto i : c)
        cout<<i<<" ";
    cout<<"\n";
}

int main()
{
    #ifndef ONLINE_JUDGE
    freopen("in.txt" , "r" , stdin);
    freopen("output.txt" , "w" , stdout);
    #endif
    ios_base::sync_with_stdio(false);
	cin.tie(NULL);

    int t;
    cin>>t;
    while(t--)
    {
        solve();
    }

    return 0;
}


#include<bits/stdc++.h>
#include<set>
#include<iterator>
#include<algorithm>
using namespace std;
#define forr(a,n) for(int i=a;i<=n;i++)
#define MAX 1000000007LL
#define mod 998244353
#define forn(n,a) for(int i=n;i>=a;i--)
#define all(x) x.begin() , x.end()
#define mp(x,y) make_pair(x,y)
#define pb(x) push_back(x)
#define pii pair<int,int>
#define ll long long
const int N = (int)1e5 + 9;
ll power(ll x,ll y)
{
    if(y == 0)
        return 1;
    ll temp = power(x,y/2);
    if(y%2 == 1)
        return temp*temp*x;
    else
        return temp*temp;
}

void solve()
{
    int n,k;
    cin>>n>>k;
    vector<int> a(n) , b;
    set<int> s;

    forr(0,n-1)
    {
        cin>>a[i];
        s.insert(a[i]);
    }

    if(s.size() > k)
    {
        cout<<"-1\n";
        return;
    }

    while(b.size() < k)
    {
        for(auto i : s)
        {
            b.pb(i);
            if(b.size() == k) break;
        }
    }

    cout<<n*k<<"\n";
    for(int i=0;i<n;i++)
    {
        for(auto i : b)
            cout<<i<<" ";
    }
    cout<<"\n";
}

int main()
{
    #ifndef ONLINE_JUDGE
    freopen("in.txt" , "r" , stdin);
    freopen("output.txt" , "w" , stdout);
    #endif
    ios_base::sync_with_stdio(false);
	cin.tie(NULL);

    int t;
    cin>>t;
    while(t--)
    {
        solve();
    }

    return 0;
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double ld;

#define imx INT_MAX
#define imn INT_MIN
#define llmx LLONG_MAX
#define llmn LLONG_MIN

#define fi first
#define se second
#define pb push_back
#define f_s(a) sort(a.begin(), a.end())
#define b_s(a) sort(a.rbegin(), a.rend())
#define p(a) cout<<a<<"\n"
// #define l(i, )
// #define rl(i, a, b) for(int i = a; i < b; i++)

/////////////////////GCD//////////////////////
ll gcd(ll a, ll b)
{
	if(b==0) return a;
	return gcd(b, a%b);
}

////////////////////SIEVE OF ERATOSTHENES//////////////////////
vector<int> sieveoferatosthenes(int n)
{
	vector<bool> prime(n+1, true);
	for(int i = 2; i <= sqrt(n); i++)
	{
		if(prime[i])
		{
			for(int j = i*i; j<=n; j+=i)
			{
				prime[j]=false;
			}
		}
	}
	vector<int> all_primes;
	for(int i = 2; i <=n; i++)
	{
		if(prime[i]) all_primes.pb(i);
	}
	return all_primes;
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	int t;
	cin>>t;
	while(t--)
	{
		int n, k;
		cin>>n>>k;
		vector<int> a(n);
		map<int, bool> is;
		for(int i = 0; i < n; i++)
		{
			cin>>a[i];
			is[a[i]]=false;
		}
		int div = n/k;
		int sum = 0;
		vector<int> ans;
		ans.clear();
		int ct = 0;
		for(int i = 0; i < n; i++)
		{
			sum+=a[i];
			if(!is[a[i]])
			{
				is[a[i]]=true;
				ct++;
			}
			is[a[i]]=true;
			// ans.pb(a[i]);
		}
		if(ct > k) p(-1);
		else
		{
			for(int i = 0; i < k+2; i++)
			{
				for(int j = 0; j < n; j++)
				{
					ans.pb(j+1);
					// cout<<a[j]<<" ";
				}
			}
			cout<<ans.size()<<endl;
			for(int i = 0; i < ans.size(); i++)
			{
				cout<<ans[i]<<" ";
			}
			cout<<endl;
		}

	}
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double ld;

#define imx INT_MAX
#define imn INT_MIN
#define llmx LLONG_MAX
#define llmn LLONG_MIN

#define fi first
#define se second
#define pb push_back
#define f_s(a) sort(a.begin(), a.end())
#define b_s(a) sort(a.rbegin(), a.rend())
#define p(a) cout<<a<<"\n"
// #define l(i, )
// #define rl(i, a, b) for(int i = a; i < b; i++)

/////////////////////GCD//////////////////////
ll gcd(ll a, ll b)
{
	if(b==0) return a;
	return gcd(b, a%b);
}

////////////////////SIEVE OF ERATOSTHENES//////////////////////
vector<int> sieveoferatosthenes(int n)
{
	vector<bool> prime(n+1, true);
	for(int i = 2; i <= sqrt(n); i++)
	{
		if(prime[i])
		{
			for(int j = i*i; j<=n; j+=i)
			{
				prime[j]=false;
			}
		}
	}
	vector<int> all_primes;
	for(int i = 2; i <=n; i++)
	{
		if(prime[i]) all_primes.pb(i);
	}
	return all_primes;
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	int t;
	cin>>t;
	while(t--)
	{
		int n, k;
		cin>>n>>k;
		vector<int> a(n);
		map<int, bool> is;
		for(int i = 0; i < n; i++)
		{
			cin>>a[i];
			is[a[i]]=false;
		}
		int div = n/k;
		int sum = 0;
		vector<int> ans;
		ans.clear();
		int ct = 0;
		for(int i = 0; i < n; i++)
		{
			sum+=a[i];
			if(!is[a[i]])
			{
				is[a[i]]=true;
				ct++;
			}
			is[a[i]]=true;
			// ans.pb(a[i]);
		}
		if(ct > k) p(-1);
		else
		{
			for(int i = 0; i < 1000; i++)
			{
				for(int j = 0; j < 100; j++)
				{
					ans.pb(j+1);
					// cout<<a[j]<<" ";
				}
			}
			cout<<10000<<endl;
			for(int i = 0; i < 10000; i++)
			{
				cout<<ans[i]<<" ";
			}
			cout<<endl;
		}

	}
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double ld;

#define imx INT_MAX
#define imn INT_MIN
#define llmx LLONG_MAX
#define llmn LLONG_MIN

#define fi first
#define se second
#define pb push_back
#define f_s(a) sort(a.begin(), a.end())
#define b_s(a) sort(a.rbegin(), a.rend())
#define p(a) cout<<a<<"\n"
// #define l(i, )
// #define rl(i, a, b) for(int i = a; i < b; i++)

/////////////////////GCD//////////////////////
ll gcd(ll a, ll b)
{
	if(b==0) return a;
	return gcd(b, a%b);
}

////////////////////SIEVE OF ERATOSTHENES//////////////////////
vector<int> sieveoferatosthenes(int n)
{
	vector<bool> prime(n+1, true);
	for(int i = 2; i <= sqrt(n); i++)
	{
		if(prime[i])
		{
			for(int j = i*i; j<=n; j+=i)
			{
				prime[j]=false;
			}
		}
	}
	vector<int> all_primes;
	for(int i = 2; i <=n; i++)
	{
		if(prime[i]) all_primes.pb(i);
	}
	return all_primes;
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	int t;
	cin>>t;
	while(t--)
	{
		int n, k;
		cin>>n>>k;
		vector<int> a(n);
		map<int, bool> is;
		for(int i = 0; i < n; i++)
		{
			cin>>a[i];
			is[a[i]]=false;
		}
		int div = n/k;
		int sum = 0;
		vector<int> ans;
		ans.clear();
		int ct = 0;
		for(int i = 0; i < n; i++)
		{
			sum+=a[i];
			if(!is[a[i]])
			{
				is[a[i]]=true;
				ct++;
			}
			is[a[i]]=true;
			// ans.pb(a[i]);
		}
		if(ct > k) p(-1);
		else
		{
			for(int i = 0; i < 1000; i++)
			{
				for(int j = 0; j < n; j++)
				{
					ans.pb(j+1);
					// cout<<a[j]<<" ";
				}
			}
			cout<<10000<<endl;
			for(int i = 0; i < 10000; i++)
			{
				cout<<ans[i]<<" ";
			}
			cout<<endl;
		}

	}
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double ld;

#define imx INT_MAX
#define imn INT_MIN
#define llmx LLONG_MAX
#define llmn LLONG_MIN

#define fi first
#define se second
#define pb push_back
#define f_s(a) sort(a.begin(), a.end())
#define b_s(a) sort(a.rbegin(), a.rend())
#define p(a) cout<<a<<"\n"
// #define l(i, )
// #define rl(i, a, b) for(int i = a; i < b; i++)

/////////////////////GCD//////////////////////
ll gcd(ll a, ll b)
{
	if(b==0) return a;
	return gcd(b, a%b);
}

////////////////////SIEVE OF ERATOSTHENES//////////////////////
vector<int> sieveoferatosthenes(int n)
{
	vector<bool> prime(n+1, true);
	for(int i = 2; i <= sqrt(n); i++)
	{
		if(prime[i])
		{
			for(int j = i*i; j<=n; j+=i)
			{
				prime[j]=false;
			}
		}
	}
	vector<int> all_primes;
	for(int i = 2; i <=n; i++)
	{
		if(prime[i]) all_primes.pb(i);
	}
	return all_primes;
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	int t;
	cin>>t;
	while(t--)
	{
		int n, k;
		cin>>n>>k;
		vector<int> a(n);
		map<int, bool> is;
		for(int i = 0; i < n; i++)
		{
			cin>>a[i];
		}
		vector<int> ans;
		int ct = 0;
		for(int i = 0; i < n; i++)
		{
			if(!is[a[i]])
			{
				is[a[i]]=true;
				ct++;
			}
		}
		if(ct > k) p(-1);
		else
		{
			for(int i = 0; i < n; i++)
				if(is[i+1]) ans.pb(i+1);

			for(int i = 0; i < n; i++)
			{
				if(ans.size()==k)break;
				if(is[i+1]==false) ans.pb(i+1);
			}
			f_s(ans);
			p(n*k);
			for(int i = 0; i < n; i++)
				for(int j = 0; j < k; j++)
					cout<<ans[j]<<" ";
			cout<<endl;
		}

	}
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double ld;

#define imx INT_MAX
#define imn INT_MIN
#define llmx LLONG_MAX
#define llmn LLONG_MIN

#define fi first
#define se second
#define pb push_back
#define f_s(a) sort(a.begin(), a.end())
#define b_s(a) sort(a.rbegin(), a.rend())
#define p(a) cout<<a<<"\n"
// #define l(i, )
// #define rl(i, a, b) for(int i = a; i < b; i++)

/////////////////////GCD//////////////////////
ll gcd(ll a, ll b)
{
	if(b==0) return a;
	return gcd(b, a%b);
}

////////////////////SIEVE OF ERATOSTHENES//////////////////////
vector<int> sieveoferatosthenes(int n)
{
	vector<bool> prime(n+1, true);
	for(int i = 2; i <= sqrt(n); i++)
	{
		if(prime[i])
		{
			for(int j = i*i; j<=n; j+=i)
			{
				prime[j]=false;
			}
		}
	}
	vector<int> all_primes;
	for(int i = 2; i <=n; i++)
	{
		if(prime[i]) all_primes.pb(i);
	}
	return all_primes;
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	int t;
	cin>>t;
	while(t--)
	{
		int n, k;
		cin>>n>>k;
		vector<int> a(n);
		map<int, bool> is;
		for(int i = 0; i < n; i++)
		{
			cin>>a[i];
			is[a[i]]=false;
		}
		int div = n/k;
		int sum = 0;
		vector<int> ans;
		ans.clear();
		int ct = 0;
		for(int i = 0; i < n; i++)
		{
			sum+=a[i];
			if(!is[a[i]])
			{
				is[a[i]]=true;
				ct++;
			}
			is[a[i]]=true;
			// ans.pb(a[i]);
		}
		if(ct > k) p(-1);
		else
		{
			for(int i = 0; i < 10002; i++)
			{
				for(int j = 0; j < n; j++)
				{
					ans.pb(j+1);
					// cout<<a[j]<<" ";
				}
			}
			cout<<10000<<endl;
			for(int i = 0; i < 10000; i++)
			{
				cout<<ans[i]<<" ";
			}
			cout<<endl;
		}

	}
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double ld;

#define imx INT_MAX
#define imn INT_MIN
#define llmx LLONG_MAX
#define llmn LLONG_MIN

#define fi first
#define se second
#define pb push_back
#define f_s(a) sort(a.begin(), a.end())
#define b_s(a) sort(a.rbegin(), a.rend())
#define p(a) cout<<a<<"\n"
// #define l(i, )
// #define rl(i, a, b) for(int i = a; i < b; i++)

/////////////////////GCD//////////////////////
ll gcd(ll a, ll b)
{
	if(b==0) return a;
	return gcd(b, a%b);
}

////////////////////SIEVE OF ERATOSTHENES//////////////////////
vector<int> sieveoferatosthenes(int n)
{
	vector<bool> prime(n+1, true);
	for(int i = 2; i <= sqrt(n); i++)
	{
		if(prime[i])
		{
			for(int j = i*i; j<=n; j+=i)
			{
				prime[j]=false;
			}
		}
	}
	vector<int> all_primes;
	for(int i = 2; i <=n; i++)
	{
		if(prime[i]) all_primes.pb(i);
	}
	return all_primes;
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	int t;
	cin>>t;
	while(t--)
	{
		int n, k;
		cin>>n>>k;
		vector<int> a(n);
		map<int, bool> is;
		for(int i = 0; i < n; i++)
		{
			cin>>a[i];
			is[a[i]]=false;
		}
		int div = n/k;
		int sum = 0;
		vector<int> ans;
		ans.clear();
		int ct = 0;
		for(int i = 0; i < n; i++)
		{
			sum+=a[i];
			if(!is[a[i]])
			{
				is[a[i]]=true;
				ct++;
			}
			is[a[i]]=true;
			// ans.pb(a[i]);
		}
		if(ct > k) p(-1);
		else
		{

			for(int i = 0; i < 10002; i++)
			{
				for(int j = 0; j < k; j++)
				{
					ans.pb(a[j]);
					// cout<<a[j]<<" ";
				}
			}
			cout<<10000<<endl;
			for(int i = 0; i < 10000; i++)
			{
				cout<<ans[i]<<" ";
			}
			cout<<endl;

			// for(int i = 0; i < k+2; i++)
			// {
			// 	for(int j = 0; j < n; j++)
			// 	{
			// 		ans.pb(j+1);
			// 		// cout<<a[j]<<" ";
			// 	}
			// }
			// cout<<ans.size()<<endl;
			// for(int i = 0; i < ans.size(); i++)
			// {
			// 	cout<<ans[i]<<" ";
			// }
			// cout<<endl;
		}

	}
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double ld;

#define imx INT_MAX
#define imn INT_MIN
#define llmx LLONG_MAX
#define llmn LLONG_MIN

#define fi first
#define se second
#define pb push_back
#define f_s(a) sort(a.begin(), a.end())
#define b_s(a) sort(a.rbegin(), a.rend())
#define p(a) cout<<a<<"\n"
// #define l(i, )
// #define rl(i, a, b) for(int i = a; i < b; i++)

/////////////////////GCD//////////////////////
ll gcd(ll a, ll b)
{
	if(b==0) return a;
	return gcd(b, a%b);
}

////////////////////SIEVE OF ERATOSTHENES//////////////////////
vector<int> sieveoferatosthenes(int n)
{
	vector<bool> prime(n+1, true);
	for(int i = 2; i <= sqrt(n); i++)
	{
		if(prime[i])
		{
			for(int j = i*i; j<=n; j+=i)
			{
				prime[j]=false;
			}
		}
	}
	vector<int> all_primes;
	for(int i = 2; i <=n; i++)
	{
		if(prime[i]) all_primes.pb(i);
	}
	return all_primes;
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	int t;
	cin>>t;
	while(t--)
	{
		int n, k;
		cin>>n>>k;
		vector<int> a(n);
		map<int, bool> is;
		for(int i = 0; i < n; i++)
		{
			cin>>a[i];
			is[a[i]]=false;
		}
		int div = n/k;
		int sum = 0;
		vector<int> ans;
		ans.clear();
		int ct = 0;
		for(int i = 0; i < n; i++)
		{
			sum+=a[i];
			if(!is[a[i]])
			{
				is[a[i]]=true;
				ct++;
			}
			is[a[i]]=true;
			// ans.pb(a[i]);
		}
		if(ct > k) p(-1);
		else
		{
			for(int i = 0; i < k; i++)
			{
				for(int j = 0; j < n; j++)
				{
					ans.pb(j+1);
					// cout<<a[j]<<" ";
				}
			}
			cout<<ans.size()<<endl;
			for(int i = 0; i < ans.size(); i++)
			{
				cout<<ans[i]<<" ";
			}
			cout<<endl;
		}

	}
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double ld;

#define imx INT_MAX
#define imn INT_MIN
#define llmx LLONG_MAX
#define llmn LLONG_MIN

#define fi first
#define se second
#define pb push_back
#define f_s(a) sort(a.begin(), a.end())
#define b_s(a) sort(a.rbegin(), a.rend())
#define p(a) cout<<a<<"\n"
// #define l(i, )
// #define rl(i, a, b) for(int i = a; i < b; i++)

/////////////////////GCD//////////////////////
ll gcd(ll a, ll b)
{
	if(b==0) return a;
	return gcd(b, a%b);
}

////////////////////SIEVE OF ERATOSTHENES//////////////////////
vector<int> sieveoferatosthenes(int n)
{
	vector<bool> prime(n+1, true);
	for(int i = 2; i <= sqrt(n); i++)
	{
		if(prime[i])
		{
			for(int j = i*i; j<=n; j+=i)
			{
				prime[j]=false;
			}
		}
	}
	vector<int> all_primes;
	for(int i = 2; i <=n; i++)
	{
		if(prime[i]) all_primes.pb(i);
	}
	return all_primes;
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	int t;
	cin>>t;
	while(t--)
	{
		int n, k;
		cin>>n>>k;
		vector<int> a(n);
		for(int i = 0; i < n; i++)
		{
			cin>>a[i];
		}
		int div = n/k;
		map<int, bool> is;
		int sum = 0;
		vector<int> ans;
		for(int i = 0; i < k; i++)
		{
			sum+=a[i];
			is[a[i]]=true;
			// ans.pb(a[i]);
		}
		int c = sum;
		int f = 0;
		for(int i = k; i < n; i++)
		{
			if(!is.count(a[i]))
			{
				f = 1;
				break;
			}
			// else
			// {
			// 	c = sum-a[i-k]+a[i];
			// 	if(c == sum)
			// 	{
			// 		ans.pb(a[i]);
			// 	}
			// 	else
			// 	{
			// 		if()
			// 	}
			// }
		}
		if(f)
		{
			cout<<-1<<endl;
		}
		else
		{

			// cout<<(1.0*n/k+1)*k<<endl;
			for(int i = 0; i < 10002; i++)
			{
				for(int j = 0; j < k; j++)
				{
					ans.pb(a[j]);
					// cout<<a[j]<<" ";
				}
			}
			cout<<10000<<endl;
			for(int i = 0; i < 10000; i++)
			{
				cout<<ans[i]<<" ";
			}
			cout<<endl;
		}

	}
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double ld;

#define imx INT_MAX
#define imn INT_MIN
#define llmx LLONG_MAX
#define llmn LLONG_MIN

#define fi first
#define se second
#define pb push_back
#define f_s(a) sort(a.begin(), a.end())
#define b_s(a) sort(a.rbegin(), a.rend())
#define p(a) cout<<a<<"\n"
// #define l(i, )
// #define rl(i, a, b) for(int i = a; i < b; i++)

/////////////////////GCD//////////////////////
ll gcd(ll a, ll b)
{
	if(b==0) return a;
	return gcd(b, a%b);
}

////////////////////SIEVE OF ERATOSTHENES//////////////////////
vector<int> sieveoferatosthenes(int n)
{
	vector<bool> prime(n+1, true);
	for(int i = 2; i <= sqrt(n); i++)
	{
		if(prime[i])
		{
			for(int j = i*i; j<=n; j+=i)
			{
				prime[j]=false;
			}
		}
	}
	vector<int> all_primes;
	for(int i = 2; i <=n; i++)
	{
		if(prime[i]) all_primes.pb(i);
	}
	return all_primes;
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	int t;
	cin>>t;
	while(t--)
	{
		int n, k;
		cin>>n>>k;
		vector<int> a(n);
		map<int, bool> is;
		for(int i = 0; i < n; i++)
		{
			cin>>a[i];
			is[a[i]]=false;
		}
		int div = n/k;
		int sum = 0;
		vector<int> ans;
		ans.clear();
		for(int i = 0; i < k; i++)
		{
			sum+=a[i];
			is[a[i]]=true;
			// ans.pb(a[i]);
		}
		int c = sum;
		int f = 0;
		for(int i = k; i < n; i++)
		{
			if(is[a[i]]==false)
			{
				f = 1;
				break;
			}
			// else
			// {
			// 	c = sum-a[i-k]+a[i];
			// 	if(c == sum)
			// 	{
			// 		ans.pb(a[i]);
			// 	}
			// 	else
			// 	{
			// 		if()
			// 	}
			// }
		}
		if(f)
		{
			cout<<-1<<endl;
		}
		else
		{

			// cout<<(1.0*n/k+1)*k<<endl;
			for(int i = 0; i < 10002; i++)
			{
				for(int j = 0; j < k; j++)
				{
					ans.pb(a[j]);
					// cout<<a[j]<<" ";
				}
			}
			cout<<10000<<endl;
			for(int i = 0; i < 10002; i++)
			{
				cout<<ans[i]<<" ";
			}
			cout<<endl;
		}

	}
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double ld;

#define imx INT_MAX
#define imn INT_MIN
#define llmx LLONG_MAX
#define llmn LLONG_MIN

#define fi first
#define se second
#define pb push_back
#define f_s(a) sort(a.begin(), a.end())
#define b_s(a) sort(a.rbegin(), a.rend())
#define p(a) cout<<a<<"\n"
// #define l(i, )
// #define rl(i, a, b) for(int i = a; i < b; i++)

/////////////////////GCD//////////////////////
ll gcd(ll a, ll b)
{
	if(b==0) return a;
	return gcd(b, a%b);
}

////////////////////SIEVE OF ERATOSTHENES//////////////////////
vector<int> sieveoferatosthenes(int n)
{
	vector<bool> prime(n+1, true);
	for(int i = 2; i <= sqrt(n); i++)
	{
		if(prime[i])
		{
			for(int j = i*i; j<=n; j+=i)
			{
				prime[j]=false;
			}
		}
	}
	vector<int> all_primes;
	for(int i = 2; i <=n; i++)
	{
		if(prime[i]) all_primes.pb(i);
	}
	return all_primes;
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	int t;
	cin>>t;
	while(t--)
	{
		int n, k;
		cin>>n>>k;
		vector<int> a(n);
		map<int, bool> is;
		for(int i = 0; i < n; i++)
		{
			cin>>a[i];
			is[a[i]]=false;
		}
		int div = n/k;
		int sum = 0;
		vector<int> ans;
		ans.clear();
		for(int i = 0; i < k; i++)
		{
			sum+=a[i];
			is[a[i]]=true;
			// ans.pb(a[i]);
		}
		int c = sum;
		int f = 0;
		for(int i = k; i < n; i++)
		{
			if(is[a[i]]==false)
			{
				f = 1;
				break;
			}
			// else
			// {
			// 	c = sum-a[i-k]+a[i];
			// 	if(c == sum)
			// 	{
			// 		ans.pb(a[i]);
			// 	}
			// 	else
			// 	{
			// 		if()
			// 	}
			// }
		}
		if(f)
		{
			cout<<-1<<endl;
		}
		else
		{

			// cout<<(1.0*n/k+1)*k<<endl;
			for(int i = 0; i < 10002; i++)
			{
				for(int j = 0; j < k; j++)
				{
					ans.pb(a[j]);
					// cout<<a[j]<<" ";
				}
			}
			cout<<10000<<endl;
			for(int i = 0; i < 10000; i++)
			{
				cout<<ans[i]<<" ";
			}
			cout<<endl;
		}

	}
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double ld;

#define imx INT_MAX
#define imn INT_MIN
#define llmx LLONG_MAX
#define llmn LLONG_MIN

#define fi first
#define se second
#define pb push_back
#define f_s(a) sort(a.begin(), a.end())
#define b_s(a) sort(a.rbegin(), a.rend())
#define p(a) cout<<a<<"\n"
// #define l(i, )
// #define rl(i, a, b) for(int i = a; i < b; i++)

/////////////////////GCD//////////////////////
ll gcd(ll a, ll b)
{
	if(b==0) return a;
	return gcd(b, a%b);
}

////////////////////SIEVE OF ERATOSTHENES//////////////////////
vector<int> sieveoferatosthenes(int n)
{
	vector<bool> prime(n+1, true);
	for(int i = 2; i <= sqrt(n); i++)
	{
		if(prime[i])
		{
			for(int j = i*i; j<=n; j+=i)
			{
				prime[j]=false;
			}
		}
	}
	vector<int> all_primes;
	for(int i = 2; i <=n; i++)
	{
		if(prime[i]) all_primes.pb(i);
	}
	return all_primes;
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	int t;
	cin>>t;
	while(t--)
	{
		int n, k;
		cin>>n>>k;
		vector<int> a(n);
		for(int i = 0; i < n; i++)
		{
			cin>>a[i];
		}
		int div = n/k;
		map<int, bool> is;
		int sum = 0;
		vector<int> ans;
		for(int i = 0; i < k; i++)
		{
			sum+=a[i];
			is[a[i]]=true;
			ans.pb(a[i]);
		}
		int c = sum;
		int f = 0;
		for(int i = k; i < n; i++)
		{
			if(!is.count(a[i]))
			{
				f = 1;
				break;
			}
			// else
			// {
			// 	c = sum-a[i-k]+a[i];
			// 	if(c == sum)
			// 	{
			// 		ans.pb(a[i]);
			// 	}
			// 	else
			// 	{
			// 		if()
			// 	}
			// }
		}
		if(f)
		{
			cout<<-1<<endl;
		}
		else
		{
			cout<<(1.0*n/k+1)*k<<endl;
			for(int i = 0; i < ceil(1.0*n/k)+1; i++)
			{
				for(int j = 0; j < k; j++)
				{
					cout<<a[j]<<" ";
				}
			}
			cout<<endl;
		}

	}
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double ld;

#define imx INT_MAX
#define imn INT_MIN
#define llmx LLONG_MAX
#define llmn LLONG_MIN

#define fi first
#define se second
#define pb push_back
#define f_s(a) sort(a.begin(), a.end())
#define b_s(a) sort(a.rbegin(), a.rend())
#define p(a) cout<<a<<"\n"
// #define l(i, )
// #define rl(i, a, b) for(int i = a; i < b; i++)

/////////////////////GCD//////////////////////
ll gcd(ll a, ll b)
{
	if(b==0) return a;
	return gcd(b, a%b);
}

////////////////////SIEVE OF ERATOSTHENES//////////////////////
vector<int> sieveoferatosthenes(int n)
{
	vector<bool> prime(n+1, true);
	for(int i = 2; i <= sqrt(n); i++)
	{
		if(prime[i])
		{
			for(int j = i*i; j<=n; j+=i)
			{
				prime[j]=false;
			}
		}
	}
	vector<int> all_primes;
	for(int i = 2; i <=n; i++)
	{
		if(prime[i]) all_primes.pb(i);
	}
	return all_primes;
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	int t;
	cin>>t;
	while(t--)
	{
		int n, k;
		cin>>n>>k;
		vector<int> a(n);
		for(int i = 0; i < n; i++)
		{
			cin>>a[i];
		}
		int div = n/k;
		map<int, bool> is;
		int sum = 0;
		vector<int> ans;
		for(int i = 0; i < k; i++)
		{
			sum+=a[i];
			is[a[i]]=true;
			// ans.pb(a[i]);
		}
		int c = sum;
		int f = 0;
		for(int i = k; i < n; i++)
		{
			if(!is.count(a[i]))
			{
				f = 1;
				break;
			}
			// else
			// {
			// 	c = sum-a[i-k]+a[i];
			// 	if(c == sum)
			// 	{
			// 		ans.pb(a[i]);
			// 	}
			// 	else
			// 	{
			// 		if()
			// 	}
			// }
		}
		if(f)
		{
			cout<<-1<<endl;
		}
		else
		{

			// cout<<(1.0*n/k+1)*k<<endl;
			for(int i = 0; i < 10000/k; i++)
			{
				for(int j = 0; j < k; j++)
				{
					ans.pb(a[j]);
					// cout<<a[j]<<" ";
				}
			}
			cout<<ans.size()<<endl;
			for(int i:ans)
			{
				cout<<i<<" ";
			}
			cout<<endl;
		}

	}
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double ld;

#define imx INT_MAX
#define imn INT_MIN
#define llmx LLONG_MAX
#define llmn LLONG_MIN

#define fi first
#define se second
#define pb push_back
#define f_s(a) sort(a.begin(), a.end())
#define b_s(a) sort(a.rbegin(), a.rend())
#define p(a) cout<<a<<"\n"
// #define l(i, )
// #define rl(i, a, b) for(int i = a; i < b; i++)

/////////////////////GCD//////////////////////
ll gcd(ll a, ll b)
{
	if(b==0) return a;
	return gcd(b, a%b);
}

////////////////////SIEVE OF ERATOSTHENES//////////////////////
vector<int> sieveoferatosthenes(int n)
{
	vector<bool> prime(n+1, true);
	for(int i = 2; i <= sqrt(n); i++)
	{
		if(prime[i])
		{
			for(int j = i*i; j<=n; j+=i)
			{
				prime[j]=false;
			}
		}
	}
	vector<int> all_primes;
	for(int i = 2; i <=n; i++)
	{
		if(prime[i]) all_primes.pb(i);
	}
	return all_primes;
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	int t;
	cin>>t;
	while(t--)
	{
		int n, k;
		cin>>n>>k;
		vector<int> a(n);
		map<int, bool> is;
		for(int i = 0; i < n; i++)
		{
			cin>>a[i];
			is[a[i]]=false;
		}
		int div = n/k;
		int sum = 0;
		vector<int> ans;
		ans.clear();
		int ct = 0;
		for(int i = 0; i < n; i++)
		{
			sum+=a[i];
			if(!is[a[i]])
			{
				is[a[i]]=true;
				ct++;
			}
			is[a[i]]=true;
			// ans.pb(a[i]);
		}
		if(ct > k) p(-1);
		else
		{
			for(int i = 0; i < 100; i++)
			{
				for(int j = 0; j < n; j++)
				{
					ans.pb(j+1);
					// cout<<a[j]<<" ";
				}
			}
			cout<<10000<<endl;
			for(int i = 0; i < 10000; i++)
			{
				cout<<ans[i]<<" ";
			}
			cout<<endl;
		}

	}
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double ld;

#define imx INT_MAX
#define imn INT_MIN
#define llmx LLONG_MAX
#define llmn LLONG_MIN

#define fi first
#define se second
#define pb push_back
#define f_s(a) sort(a.begin(), a.end())
#define b_s(a) sort(a.rbegin(), a.rend())
#define p(a) cout<<a<<"\n"
// #define l(i, )
// #define rl(i, a, b) for(int i = a; i < b; i++)

/////////////////////GCD//////////////////////
ll gcd(ll a, ll b)
{
	if(b==0) return a;
	return gcd(b, a%b);
}

////////////////////SIEVE OF ERATOSTHENES//////////////////////
vector<int> sieveoferatosthenes(int n)
{
	vector<bool> prime(n+1, true);
	for(int i = 2; i <= sqrt(n); i++)
	{
		if(prime[i])
		{
			for(int j = i*i; j<=n; j+=i)
			{
				prime[j]=false;
			}
		}
	}
	vector<int> all_primes;
	for(int i = 2; i <=n; i++)
	{
		if(prime[i]) all_primes.pb(i);
	}
	return all_primes;
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	int t;
	cin>>t;
	while(t--)
	{
		int n, k;
		cin>>n>>k;
		vector<int> a(n);
		map<int, bool> is;
		for(int i = 0; i < n; i++)
		{
			cin>>a[i];
			is[a[i]]=false;
		}
		int div = n/k;
		int sum = 0;
		vector<int> ans;
		ans.clear();
		int ct = 0;
		for(int i = 0; i < n; i++)
		{
			sum+=a[i];
			if(!is[a[i]])
			{
				is[a[i]]=true;
				ct++;
			}
			is[a[i]]=true;
			// ans.pb(a[i]);
		}
		if(ct > k) p(-1);
		else
		{
			for(int i = 0; i < n; i++)
			{
				is[i+1] ans.pb(i+1);
			}
			for(int i = 0; i < n; i++)
			{
				if(ans.size()==k)break;
				if(is[i+1]==false) ans.pb(i+1);
			}
			sort(ans.begin(), ans.end());
			// if(ans.size()!=k)
			// {
			// 	for(int i = 0)
			// 	if(is[i+])
			// }
			cout<<n*k<<endl;
			for(int i = 0; i < n; i++)
			{
				for(int j = 0; j < k; j++)
				{
					// ans.pb(a[j]);
					cout<<ans[j]<<" ";
					// cout<<a[j]<<" ";
				}
			}
			// cout<<10000<<endl;
			// for(int i = 0; i < 10000; i++)
			// {
			// 	cout<<ans[i]<<" ";
			// }
			// cout<<endl;

			// for(int i = 0; i < k+2; i++)
			// {
			// 	for(int j = 0; j < n; j++)
			// 	{
			// 		ans.pb(j+1);
			// 		// cout<<a[j]<<" ";
			// 	}
			// }
			// cout<<ans.size()<<endl;
			// for(int i = 0; i < ans.size(); i++)
			// {
			// 	cout<<ans[i]<<" ";
			// }
			// cout<<endl;
		}

	}
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double ld;

#define imx INT_MAX
#define imn INT_MIN
#define llmx LLONG_MAX
#define llmn LLONG_MIN

#define fi first
#define se second
#define pb push_back
#define f_s(a) sort(a.begin(), a.end())
#define b_s(a) sort(a.rbegin(), a.rend())
#define p(a) cout<<a<<"\n"
// #define l(i, )
// #define rl(i, a, b) for(int i = a; i < b; i++)

/////////////////////GCD//////////////////////
ll gcd(ll a, ll b)
{
	if(b==0) return a;
	return gcd(b, a%b);
}

////////////////////SIEVE OF ERATOSTHENES//////////////////////
vector<int> sieveoferatosthenes(int n)
{
	vector<bool> prime(n+1, true);
	for(int i = 2; i <= sqrt(n); i++)
	{
		if(prime[i])
		{
			for(int j = i*i; j<=n; j+=i)
			{
				prime[j]=false;
			}
		}
	}
	vector<int> all_primes;
	for(int i = 2; i <=n; i++)
	{
		if(prime[i]) all_primes.pb(i);
	}
	return all_primes;
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	int t;
	cin>>t;
	while(t--)
	{
		int n, k;
		cin>>n>>k;
		vector<int> a(n);
		for(int i = 0; i < n; i++)
		{
			cin>>a[i];
		}
		int div = n/k;
		map<int, bool> is;
		int sum = 0;
		vector<int> ans;
		for(int i = 0; i < k; i++)
		{
			sum+=a[i];
			is[a[i]]=true;
			// ans.pb(a[i]);
		}
		int c = sum;
		int f = 0;
		for(int i = k; i < n; i++)
		{
			if(!is.count(a[i]))
			{
				f = 1;
				break;
			}
			// else
			// {
			// 	c = sum-a[i-k]+a[i];
			// 	if(c == sum)
			// 	{
			// 		ans.pb(a[i]);
			// 	}
			// 	else
			// 	{
			// 		if()
			// 	}
			// }
		}
		if(f)
		{
			cout<<-1<<endl;
		}
		else
		{

			// cout<<(1.0*n/k+1)*k<<endl;
			for(int i = 0; i < ceil(1.0*n/k)+1; i++)
			{
				for(int j = 0; j < k; j++)
				{
					ans.pb(a[j]);
					// cout<<a[j]<<" ";
				}
			}
			cout<<ans.size()<<endl;
			for(int i:ans)
			{
				cout<<i<<" ";
			}
			cout<<endl;
		}

	}
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double ld;

#define imx INT_MAX
#define imn INT_MIN
#define llmx LLONG_MAX
#define llmn LLONG_MIN

#define fi first
#define se second
#define pb push_back
#define f_s(a) sort(a.begin(), a.end())
#define b_s(a) sort(a.rbegin(), a.rend())
#define p(a) cout<<a<<"\n"
// #define l(i, )
// #define rl(i, a, b) for(int i = a; i < b; i++)

/////////////////////GCD//////////////////////
ll gcd(ll a, ll b)
{
	if(b==0) return a;
	return gcd(b, a%b);
}

////////////////////SIEVE OF ERATOSTHENES//////////////////////
vector<int> sieveoferatosthenes(int n)
{
	vector<bool> prime(n+1, true);
	for(int i = 2; i <= sqrt(n); i++)
	{
		if(prime[i])
		{
			for(int j = i*i; j<=n; j+=i)
			{
				prime[j]=false;
			}
		}
	}
	vector<int> all_primes;
	for(int i = 2; i <=n; i++)
	{
		if(prime[i]) all_primes.pb(i);
	}
	return all_primes;
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	int t;
	cin>>t;
	while(t--)
	{
		int n, k;
		cin>>n>>k;
		vector<int> a(n);
		map<int, bool> is;
		for(int i = 0; i < n; i++)
		{
			cin>>a[i];
			is[a[i]]=false;
		}
		int div = n/k;
		int sum = 0;
		vector<int> ans;
		ans.clear();
		int ct = 0;
		for(int i = 0; i < n; i++)
		{
			sum+=a[i];
			if(!is[a[i]])
			{
				is[a[i]]=true;
				ct++;
			}
			is[a[i]]=true;
			// ans.pb(a[i]);
		}
		if(ct > k) p(-1);
		else
		{
			for(int i = 0; i < n; i++)
			{
				if(is[i+1]) ans.pb(i+1);
			}
			for(int i = 0; i < n; i++)
			{
				if(ans.size()==k)break;
				if(is[i+1]==false) ans.pb(i+1);
			}
			sort(ans.begin(), ans.end());
			// if(ans.size()!=k)
			// {
			// 	for(int i = 0)
			// 	if(is[i+])
			// }
			cout<<n*k<<endl;
			for(int i = 0; i < n; i++)
			{
				for(int j = 0; j < k; j++)
				{
					// ans.pb(a[j]);
					cout<<ans[j]<<" ";
					// cout<<a[j]<<" ";
				}
			}
			// cout<<10000<<endl;
			// for(int i = 0; i < 10000; i++)
			// {
			// 	cout<<ans[i]<<" ";
			// }
			// cout<<endl;

			// for(int i = 0; i < k+2; i++)
			// {
			// 	for(int j = 0; j < n; j++)
			// 	{
			// 		ans.pb(j+1);
			// 		// cout<<a[j]<<" ";
			// 	}
			// }
			// cout<<ans.size()<<endl;
			// for(int i = 0; i < ans.size(); i++)
			// {
			// 	cout<<ans[i]<<" ";
			// }
			cout<<endl;
		}

	}
}


#include<bits/stdc++.h>
using namespace std;
bool judge(map<int,int>& mmap,int a[],int n,int k){
    for(int i=k+1;i<=n;++i)
        if(!mmap.count(a[i]))
            return false;
    return true;
}
int main(){
    int T,a[103]={};
    cin>>T;
    while(T--){
        map<int,int> m;
        int n,k;
        cin>>n>>k;
        for(int i=1;i<=n;++i)
            cin>>a[i];
        for(int i=1;i<=k;++i)
            m[a[i]]++;
        if(judge(m,a,n,k)){
            int temp[111]={},mmax=0;
            for(int i=k+1;i<=n;++i)
                temp[a[i]]++;
            for(int i=1;i<=n;++i){
                if(temp[i]){
                    mmax=max(mmax,temp[i]/m[i]+1);
                }
            }
            cout<<mmax*k+k<<endl;
            for(int i=1;i<=mmax+1;++i)
                for(int j=1;j<=k;++j){
                    if(i==1&& j==1) cout<<a[j];
                    else cout<<" "<<a[j];
            }
            cout<<endl;
        }else cout<<"-1"<<endl;

    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;

bool judge(map<int,int>& mmap,int n,int k){
    int sum=0;
    for(int i=1;i<=n;++i)
        if(mmap.count(i)) ++sum;
    if(sum>k) return false;
    else return true;
}
int main(){
    int T,a[103]={};
    cin>>T;
    while(T--){
        map<int,int> m;
        int n,k;
        cin>>n>>k;
        for(int i=1;i<=n;++i)
            cin>>a[i];
        for(int i=1;i<=k;++i)
            m[a[i]]++;
        if(judge(m,n,k)){
            vector<int> vec;
            int vis[111]={},mmax=1;
            for(int i=1;i<=k;++i)
                vis[a[i]]++;
            for(int i=k+1;i<=n;++i){
                if(!vis[a[i]]){
                    vis[a[i]]++;
                    vec.push_back(a[i]);
                }
            }
            mmax=(n-k)+1;
            cout<<mmax*(k+vec.size())<<endl;
            for(int i=1;i<=mmax;++i){
                for(int j=1;j<=k;++j){
                    if(i==1 && j==1) cout<<a[j];
                    else cout<<" "<<a[j];
                }
                for(int k=0;k<vec.size();++k)
                    cout<<" "<<vec[k];
            }
            cout<<endl;

        }else cout<<"-1"<<endl;

    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
bool judge(map<int,int>& mmap,int a[],int n,int k){
    for(int i=k+1;i<=n;++i)
        if(!mmap.count(a[i]))
            return false;
    return true;
}
int main(){
    int T,a[103]={};
    cin>>T;
    while(T--){
        map<int,int> m;
        int n,k;
        cin>>n>>k;
        for(int i=1;i<=n;++i)
            cin>>a[i];
        for(int i=1;i<=k;++i)
            m[a[i]]++;
        if(judge(m,a,n,k)){
            int temp[111]={},mmax=-1;
            for(int i=k+1;i<=n;++i)
                temp[a[i]]++;
            for(int i=1;i<=n;++i){
                if(temp[i] && m.count(i)){
                    mmax=max(mmax,temp[i]/m[i]+1);
                }
            }
            if(mmax<=0) mmax=0;
            cout<<mmax*k+k<<endl;
            for(int i=1;i<=mmax+1;++i)
                for(int j=1;j<=k;++j){
                    if(i==1&& j==1) cout<<a[j];
                    else cout<<" "<<a[j];
            }
            cout<<endl;
        }else cout<<"-1"<<endl;

    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
bool judge(map<int,int>& mmap,int a[],int n,int k){
    for(int i=k+1;i<=n;++i)
        if(!mmap.count(a[i])) return false ;
    return true;
}
int main(){
    int T,a[103]={};
    cin>>T;
    while(T--){
        map<int,int> m;
        int n,k;
        cin>>n>>k;
        for(int i=1;i<=n;++i)
            cin>>a[i];
        for(int i=1;i<=k;++i)
            m[a[i]]++;

        if(judge(m,a,n,k)){

            int mmax=(n-k)+1;
            cout<<mmax*k<<endl;
            for(int i=1;i<=mmax;++i){
                for(int j=1;j<=k;++j){
                    if(i==1 && j==1) cout<<a[j];
                    else cout<<" "<<a[j];
                }
            }
            cout<<endl;
        }else cout<<"-1"<<endl;

    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
bool judge(map<int,int>& mmap,int n,int k){
    int sum=0;
    for(int i=1;i<=n;++i){
        if(mmap.count(i)) ++sum;

    }
    if(sum>k) return false;
    else return true;
}
int main(){
    int T,a[103]={};
    cin>>T;
    while(T--){
        map<int,int> m;
        int n,k;
        cin>>n>>k;
        for(int i=1;i<=n;++i){
            cin>>a[i];
            m[a[i]]++;
        }
        if(judge(m,n,k)){
            vector<int> vec;
            int vis[111]={},mmax=1;
            for(int i=1;i<=k;++i)
                vis[a[i]]++;
            for(int i=k+1;i<=n;++i){
                if(!vis[a[i]]){
                    vis[a[i]]++;
                    vec.push_back(a[i]);
                }
            }
            for(int i=1;i<=n;++i)
                mmax=max(mmax,m[a[i]]);
            //cout<<mmax<<endl;
            cout<<mmax*(k+vec.size())<<endl;
            for(int i=1;i<=mmax;++i){
                for(int j=1;j<=k;++j){
                    if(i==1 && j==1) cout<<a[j];
                    else cout<<" "<<a[j];
                }
                for(int k=0;k<vec.size();++k)
                    cout<<" "<<a[k];
            }
            cout<<endl;

        }else cout<<"-1"<<endl;

    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
bool judge(map<int,int>& mmap,int a[],int n,int k){
    for(int i=k+1;i<=n;++i)
        if(!mmap.count(a[i]))
            return false;
    return true;
}
int main(){
    int T,a[103]={};
    cin>>T;
    while(T--){
        map<int,int> m;
        int n,k;
        cin>>n>>k;
        for(int i=1;i<=n;++i)
            cin>>a[i];
        for(int i=1;i<=k;++i)
            m[a[i]]++;
        if(judge(m,a,n,k)){
            int temp[111]={},mmax=-1;
            for(int i=k+1;i<=n;++i)
                temp[a[i]]++;
            for(int i=1;i<=n;++i){
                if(temp[i] && m.count(i)){
                    mmax=max(mmax,temp[i]/m[i]+1);
                }
            }
            cout<<max((mmax+1)*k,k)<<endl;
            for(int i=1;i<=mmax+1;++i)
                for(int j=1;j<=k;++j){
                    if(i==1&& j==1) cout<<a[j];
                    else cout<<" "<<a[j];
            }
            cout<<endl;
        }else cout<<"-1"<<endl;

    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int sum=0;
bool judge(map<int,int>& mmap,int n,int k){
    for(int i=1;i<=n;++i){
        if(mmap.count(i)) ++sum;
    }
    if(sum>k) return false;
    else return true;
}
int main(){
    int T,a[103]={};
    cin>>T;
    while(T--){
        map<int,int> m;
        int n,k;sum=0;
        cin>>n>>k;
        for(int i=1;i<=n;++i)
            cin>>a[i];
        for(int i=1;i<=k;++i)
            m[a[i]]++;
        if(judge(m,n,k)){
            vector<int> vec;
            int vis[111]={},mmax=1;
            for(int i=1;i<=k;++i)
                vis[a[i]]++;
            for(int i=k+1;i<=n;++i){
                if(!vis[a[i]]){
                    vis[a[i]]++;
                    //cout<<a[i]<<" -";
                    vec.push_back(a[i]);
                }
            }
            //cout<<sum<<endl;
            if(sum+vec.size()<=k){
                mmax=(n-k)+1;
                cout<<mmax*(k+vec.size())<<endl;
                for(int i=1;i<=mmax;++i){
                    for(int j=1;j<=k;++j){
                        if(i==1 && j==1) cout<<a[j];
                        else cout<<" "<<a[j];
                    }
                    for(int k=0;k<vec.size();++k)
                        cout<<" "<<vec[k];
                }
            }else cout<<"-1";
            cout<<endl;

        }else cout<<"-1"<<endl;

    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
bool judge(map<int,int>& mmap,int n,int k){
    int sum=0;
    for(int i=1;i<=n;++i){
        if(mmap.count(i)) ++sum;

    }
    if(sum>k) return false;
    else return true;
}
int main(){
    int T,a[103]={};
    cin>>T;
    while(T--){
        map<int,int> m;
        int n,k;
        cin>>n>>k;
        for(int i=1;i<=n;++i){
            cin>>a[i];
            m[a[i]]++;
        }
        if(judge(m,n,k)){
            vector<int> vec;
            int vis[111]={},mmax=1;
            for(int i=1;i<=k;++i)
                vis[a[i]]++;
            for(int i=k+1;i<=n;++i){
                if(!vis[a[i]]){
                    vis[a[i]]++;
                    vec.push_back(a[i]);
                }
            }
            mmax=(n-k)+1;
            cout<<mmax*(k+vec.size())<<endl;
            for(int i=1;i<=mmax;++i){
                for(int j=1;j<=k;++j){
                    if(i==1 && j==1) cout<<a[j];
                    else cout<<" "<<a[j];
                }
                for(int k=0;k<vec.size();++k)
                    cout<<" "<<a[k];
            }
            cout<<endl;

        }else cout<<"-1"<<endl;

    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
bool judge(map<int,int>& mmap,int a[],int n,int k){
    for(int i=k+1;i<=n;++i)
        if(!mmap.count(a[i])) return false ;
    return true;
}
int main(){
    int T,a[103]={};
    cin>>T;
    while(T--){
        map<int,int> m;
        vector<int> vec;
        int n,k;
        cin>>n>>k;
        for(int i=1;i<=n;++i)
        {
            cin>>a[i];
            if(!m.count(a[i])) {
                m[a[i]]++;
                vec.push_back(a[i]);
            }
        }

        if(vec.size()<=k){
            int len=vec.size();
            cout<<n*k<<endl;
            for(int i=1;i<=n;++i){
                for(int j=0;j<k;++j){
                    if(i==1 && j==0) cout<<vec[j];
                    else cout<<" "<<vec[j%len];
                }
            }
            cout<<endl;
        }else cout<<"-1"<<endl;

    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
bool judge(map<int,int>& mmap,int a[],int n,int k){
    for(int i=k+1;i<=n;++i)
        if(!mmap.count(a[i])) return false ;
    return true;
}
int main(){
    int T,a[103]={};
    cin>>T;
    while(T--){
        map<int,int> m;
        vector<int> vec;
        int n,k;
        cin>>n>>k;
        for(int i=1;i<=n;++i)
        {
            cin>>a[i];
            if(!m.count(a[i])) {
                m[a[i]]++;
                vec.push_back(a[i]);
            }
        }

        if(vec.size()<=k){
            cout<<vec.size()*k<<endl;
            for(int i=1;i<=n;++i){
                for(int j=0;j<vec.size();++j){
                    if(i==1 && j==0) cout<<vec[j];
                    else cout<<" "<<vec[j];
                }
            }
            cout<<endl;
        }else cout<<"-1"<<endl;

    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;

bool judge(map<int,int>& mmap,int n,int k){
    int sum=0;
    for(int i=1;i<=n;++i)
        if(mmap.count(i)) ++sum;
    if(sum>k) return false;
    else return true;
}
int main(){
    int T,a[103]={};
    cin>>T;
    while(T--){
        map<int,int> m;
        int n,k;sum=0;
        cin>>n>>k;
        for(int i=1;i<=n;++i)
            cin>>a[i];
        for(int i=1;i<=k;++i)
            m[a[i]]++;
        if(judge(m,n,k)){
            vector<int> vec;
            int vis[111]={},mmax=1;
            for(int i=1;i<=k;++i)
                vis[a[i]]++;
            for(int i=k+1;i<=n;++i){
                if(!vis[a[i]]){
                    vis[a[i]]++;
                    vec.push_back(a[i]);
                }
            }
            mmax=(n-k)+1;
            cout<<mmax*(k+vec.size())<<endl;
            for(int i=1;i<=mmax;++i){
                for(int j=1;j<=k;++j){
                    if(i==1 && j==1) cout<<a[j];
                    else cout<<" "<<a[j];
                }
                for(int k=0;k<vec.size();++k)
                    cout<<" "<<vec[k];
            }
            cout<<endl;

        }else cout<<"-1"<<endl;

    }
    return 0;
}


#include <bits/stdc++.h>
#include<vector>
#define ll long long int
#define ull unsigned long long int
#define rep(i,n) for(ll i=0;i<n;i++)
#define loop(i,a,b) for(ll i=a;i<=b;i++)
using namespace std;
void solve()
{
    ll n, k, j=1, check=0, count=0;
    cin>>n>>k;
    ll s=0;
    vector<ll> vect;
    vector<ll> vect2;
    vector<ll> vect3;
    unordered_map<ll, ll> map2;
    for(ll i=0; i<n; ++i )
    {
        ll num;
        cin>>num;
        vect.push_back(num);
        if(map2.find(num)==map2.end())
        {
            vect3.push_back(num);
            map2[num]++;
        }
    }
    sort(vect3.begin(), vect3.end());
    for(ll i=0; i<k; i++)
    {
        s+=vect3[i];
    }
    unordered_map<ll, ll> map;
    for(ll i=0; i<n; i++)
    {
        if(map.find(vect[i])==map.end())
        {
            map[vect[i]]++;
            vect2.push_back(vect[i]);
        }
    }
    if(vect.size()!=1&&vect3.size()>k)
    {
        cout<<"-1"<<endl;
        return;
    }
    if(vect2.size()==vect.size())
    {
        cout << vect.size()*2<<endl;
        for(ll i=0; i<vect2.size(); i++)
        {
            cout<<vect2[i]<<" ";
        }
        for(ll i=0; i<vect2.size(); i++)
        {
            cout<<vect2[i]<<" ";
        }
        cout<<endl;
        return;
    }
    ll siz=0;
    while(siz<n)
    {
        siz+=vect2.size();
    }
    cout<<vect2.size()*n<<endl;
    ll loop=0;
    while(loop<n)
    {
        for(ll i=0; i<vect2.size(); i++)
        {
            cout<<vect2[i]<<" ";
        }
        loop+=1;
    }
    cout<<endl;
}
int main() {
    ll tests;
    cin>>tests;
    while(tests--)
    solve();
}


#include <bits/stdc++.h>
#include<vector>
#define ll long long int
#define ull unsigned long long int
#define rep(i,n) for(ll i=0;i<n;i++)
#define loop(i,a,b) for(ll i=a;i<=b;i++)
using namespace std;
void solve()
{
    ll n, k, j=1, check=0, count=0;
    cin>>n>>k;
    ll s=0;
    vector<ll> vect;
    vector<ll> vect2;
    for(ll i=0; i<n; ++i )
    {
        ll num;
        cin>>num;
        vect.push_back(num);
    }
    unordered_map<ll, ll> map;
    for(ll i=0; i<n; i++)
    {
        if(map.find(vect[i])==map.end())
        {
            map[vect[i]]++;
            vect2.push_back(vect[i]);
        }
    }
    if(vect3.size()>k)
    {
        cout<<"-1"<<endl;
        return;
    }
    ll siz=0;
    cout<<vect2.size()*n<<endl;
    ll loop=0;
    while(loop<n)
    {
        for(ll i=0; i<vect2.size(); i++)
        {
            cout<<vect2[i]<<" ";
        }
        loop+=1;
    }
    cout<<endl;
}
int main() {
    ll tests;
    cin>>tests;
    while(tests--)
    solve();
}


#include <bits/stdc++.h>
#include<vector>
#define ll long long int
#define ull unsigned long long int
#define rep(i,n) for(ll i=0;i<n;i++)
#define loop(i,a,b) for(ll i=a;i<=b;i++)
using namespace std;
void solve()
{
    ll n, k, j=1, check=0, count=0;
    cin>>n>>k;
    vector<ll> vect;
    vector<ll> vect2;
    for(ll i=0; i<n; ++i )
    {
        ll num;
        cin>>num;
        vect.push_back(num);
        if(check<=num)
        {
            count=-1;
        }
        check+=num;
    }
    /*if(count==-1)
    {
        cout<<"-1"<<endl;
    }*/
    unordered_map<ll, ll> map;
    for(ll i=0; i<n; i++)
    {
        if(map.find(vect[i])==map.end())
        {
            map[vect[i]]++;
            vect2.push_back(vect[i]);
        }
    }
    if(vect.size()<=3&&vect2.size()==vect.size())
    {
        cout<<"-1"<<endl;
        return;
    }
    ll siz=0;
    while(siz<n)
    {
        siz+=vect2.size();
    }
    cout<<siz<<endl;
    ll loop=0;
    while(loop<n)
    {
        for(ll i=0; i<vect2.size(); i++)
        {
            cout<<vect2[i]<<" ";
        }
        loop+=vect2.size();
    }
    cout<<endl;
}
int main() {
    ll tests;
    cin>>tests;
    while(tests--)
    solve();
}