#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> a, b;
  int t, n, k, i, j, m, x, l, cont;
  cin >> t;
  while (t--) {
    a.clear();
    b.clear();
    cin >> n >> k;
    for (i = 0; i < n; i++) {
      cin >> x;
      a.push_back(x);
    }
    l = 1;
    b.push_back(a[0]);
    for (i = 1; i < n; i++) {
      cont = 0;
      for (j = 0; j < l; j++)
        if (a[i] != b[j]) cont++;
      if (l == cont) {
        l++;
        b.push_back(a[i]);
      }
    }
    if (l > k)
      cout << "-1" << endl;
    else {
      if (l < k) {
        for (i = 0; l < k; i++, l++) b.push_back(a[i]);
      }
      m = n * k;
      cout << m << endl;
      for (i = 0; i < n * k; i++) cout << b[i % k] << " ";
    }
  }
  return 0;
}
