#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t, z;
  cin >> t;
  for (z = 0; z < t; z++) {
    int n, k, i;
    cin >> n >> k;
    unordered_map<int, int> m;
    vector<int> req;
    int a[n];
    for (i = 0; i < n; i++) {
      cin >> a[i];
      if (m[a[i]] == 0) {
        req.push_back(a[i]);
      }
      m[a[i]]++;
    }
    if (m.size() > k) {
      cout << -1 << endl;
      continue;
    } else {
      int x = req.size();
      vector<int> ans;
      for (i = 0; i < x; i++) {
        ans.push_back(req[i]);
      }
      i = 0;
      while (ans.size() < k) {
        ans.push_back(a[i]);
        i++;
      }
      while (i < n) {
        if (ans[ans.size() - k] == a[i]) {
          ans.push_back(a[i]);
          i++;
        } else {
          ans.push_back(ans[ans.size() - k]);
        }
      }
      cout << ans.size() << endl;
      for (i = 0; i < ans.size(); i++) {
        cout << ans[i] << " ";
      }
      cout << endl;
    }
  }
}
