#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000000;
int work() {
  int n, x, y, myc;
  cin >> n >> x >> y;
  set<int> nm;
  for (int i = 0; i <= n; ++i) nm.emplace(i);
  vector<int> ar(n);
  for (auto &i : ar) cin >> i, i--;
  vector<vector<int>> col(n + 1);
  for (int i = 0; i < n; ++i) col[ar[i]].emplace_back(i), nm.erase(ar[i]);
  myc = *nm.begin();
  vector<int> ans(n, -1);
  set<pair<int, int>, greater<pair<int, int>>> findb;
  vector<bool> sovp(n, false);
  for (int i = 0; i <= n; ++i) {
    findb.emplace((int)col[i].size(), i);
  }
  for (int i = 0; i < x; ++i) {
    auto it = findb.begin();
    pair<int, int> p = *it;
    findb.erase(it);
    int ind = col[p.second].back();
    col[p.second].pop_back();
    ans[ind] = ar[ind];
    sovp[ind] = true;
    findb.emplace(p.first - 1, p.second);
  }
  vector<int> swp(n - x);
  int cyc = (n - x) / 2;
  int cnt = 0;
  for (auto &list : col) {
    for (auto &val : list) {
      swp[(cnt + cyc) % (n - x)] = val;
      cnt++;
    }
  }
  assert(cnt == n - x);
  cnt = 0;
  int cntcol = 0;
  for (auto &list : col) {
    for (auto &val : list) {
      ans[swp[cnt]] = cntcol;
      cnt++;
    }
    cntcol++;
  }
  int k = n - y;
  for (int i = 0; i < n; ++i) {
    if (ans[i] == ar[i] && !sovp[i]) {
      if (k == 0) return cout << "NO" << endl, 0;
      k--;
      ans[i] = myc;
    }
  }
  for (int i = 0; i < n && k > 0; ++i) {
    if (ans[i] != ar[i] && ans[i] != myc) ans[i] = myc, k--;
  }
  if (k != 0) return cout << "NO" << endl, 0;
  cout << "YES" << endl;
  for (auto i : ans) cout << i + 1 << ' ';
  cout << endl;
  return 0;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int t;
  cin >> t;
  while (t--) {
    work();
  }
  return 0;
}
