#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10, mod = 1e9 + 7;
int arr[N];
int main() {
  int tc = 1;
  scanf("%d", &tc);
  while (tc--) {
    int n, k;
    scanf("%d%d", &n, &k);
    for (int i = 0; i < n; i++) scanf("%d", &arr[i]);
    vector<int> cnt(n + 1, 0);
    int ds = 0;
    for (int i = 0; i < n; i++) {
      ds += (!cnt[arr[i]]);
      cnt[arr[i]]++;
    }
    if (ds > k)
      puts("-1");
    else {
      vector<int> ret;
      int i = 0;
      for (int j = 1; j <= n; j++) {
        if (cnt[j]) {
          ret.push_back(j);
          if (arr[i] == j) i++;
          cnt[j]--;
        }
      }
      for (int j = 1; j <= n; j++) {
        while (cnt[j] && ret.size() < k) {
          ret.push_back(j);
          if (arr[i] == j) i++;
          cnt[j]--;
        }
      }
      assert(ret.size() == k);
      while (i < n) {
        ret.push_back(ret[ret.size() - k]);
        if (ret.back() == arr[i]) i++;
        assert(ret.size() <= (int)1e4);
      }
      printf("%d\n", ret.size());
      for (int x : ret) printf("%d ", x);
      puts("");
    }
  }
  return 0;
}
