#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 10;
const double EPS = 1e-12;
int T, n, m, k;
int a[MAXN];
vector<int> G;
set<int> s;
int main() {
  scanf("%d", &T);
  while (T--) {
    G.clear();
    s.clear();
    scanf("%d %d", &n, &k);
    for (int i = 1; i <= n; i++) scanf("%d", &a[i]), s.insert(a[i]);
    if (s.size() > k) {
      puts("-1");
      continue;
    }
    for (; G.size() < k;)
      for (auto i = s.begin(); i != s.end() && G.size() < k; i++)
        G.push_back(*i);
    for (int i = 1; i <= n; i++) {
      if (G[G.size() - k] == a[i])
        G.push_back(a[i]);
      else {
        i--;
        G.push_back(G[G.size() - k]);
      }
    }
    cout << G.size() << '\n';
    for (auto v : G) cout << v << ' ';
    puts("");
  }
}
