#include <bits/stdc++.h>
using namespace std;
template <typename T, typename U>
void amin(T& a, U b) {
  if (a > b) a = b;
}
template <typename T, typename U>
void amax(T& a, U b) {
  if (a < b) a = b;
}
const long long INF = 1e18;
const int32_t M = 1e9 + 7;
void solve() {
  long long n;
  cin >> n;
  long long k;
  cin >> k;
  vector<long long> a(n);
  for (long long i = 0; i < n; i++) cin >> a[i];
  if (n == k) {
    cout << n << "\n";
    for (long long i = 0; i < a.size(); i++) cout << a[i] << " ";
    ;
    cout << "\n";
    return;
  }
  vector<long long> g;
  map<long long, long long> m;
  for (long long i = 0; i < n; i++) m[a[i]]++;
  for (auto i : m) g.push_back(i.first);
  for (long long i = 0; i < n; i++) g.push_back(a[i]);
  vector<long long> ans;
  for (long long i = 0; i < k; i++) ans.push_back(g[i]);
  long long ne = g.size();
  long long last = g[0];
  long long i = k, j = 0;
  int f = 0;
  while (i < ne && ans.size() < 10001) {
    if (g[i] == last) {
      ans.push_back(g[i]);
      i++;
    } else {
      ans.push_back(last);
    }
    j = (j + 1) % k;
    last = g[j];
    if (ans.size() >= 10001) {
      f = 1;
      break;
    }
  }
  if (f == 0) {
    cout << ans.size() << "\n";
    for (long long i = 0; i < ans.size(); i++) cout << ans[i] << " ";
    ;
    cout << "\n";
  } else {
    cout << -1 << "\n";
    return;
  }
}
void input() {}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  input();
  int i = 1;
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
}
