#include <bits/stdc++.h>
using namespace std;
const long long inf = 2e9;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t;
  cin >> t;
  for (long long q = 0; q < t; q++) {
    long long n, k;
    cin >> n >> k;
    vector<long long> v(n);
    for (long long c = 0; c < n; c++) cin >> v[c];
    vector<long long> ans;
    long long kol = 0;
    set<long long> st;
    for (auto i : v) st.insert(i);
    if (st.size() > k) {
      cout << "-1\n";
      continue;
    }
    for (auto i : st) {
      ans.push_back(i);
    }
    while (ans.size() < k) {
      ans.push_back(1);
    }
    for (long long c = 1; c < n; c++) {
      kol = 0;
      while (v[c] != ans[ans.size() - k]) {
        ans.push_back(ans[ans.size() - k]);
        kol++;
        if (kol > k) break;
      }
      if (kol > k) break;
      ans.push_back(v[c]);
    }
    cout << ans.size() << "\n";
    for (auto i : ans) cout << i << " ";
    cout << "\n";
  }
  return 0;
}
