#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int T;
  cin >> T;
  while (T--) {
    int n, x, y;
    cin >> n >> x >> y;
    vector<int> a(n, 0), b(n, 0);
    vector<vector<int>> idx(n + 2), cnt(n + 1);
    for (int i = 0; i < n; ++i) {
      cin >> b[i];
      idx[b[i]].push_back(i);
    }
    int subs;
    for (int i = 1; i <= n + 1; ++i) {
      cnt[idx[i].size()].push_back(i);
      if (idx[i].size() == 0) subs = i;
    }
    int j = n;
    for (int i = 0; i < x; ++i) {
      while (cnt[j].empty()) --j;
      int clr = cnt[j].back();
      cnt[j].pop_back();
      cnt[j - 1].push_back(clr);
      a[idx[clr].back()] = clr;
      idx[clr].pop_back();
    }
    while (cnt[j].empty()) --j;
    if (2 * j > 2 * n - y - x) {
      cout << "NO" << endl;
      continue;
    }
    vector<int> ve;
    while (j > 0) {
      for (int clr : cnt[j])
        ve.insert(ve.end(), idx[clr].begin(), idx[clr].end());
      --j;
    }
    int ves = ve.size(), mismatch = y - x;
    for (int i = 0; i < ves; ++i) {
      if (mismatch > 0) {
        j = (i + (n - x) / 2) % ves;
        if (b[ve[i]] == b[ve[j]]) {
          a[ve[i]] = subs;
        } else {
          a[ve[i]] = b[ve[j]];
          --mismatch;
        }
      } else
        a[ve[i]] = subs;
    }
    cout << "YES" << endl;
    for (int i = 0; i < n; ++i) cout << a[i] << " ";
    cout << endl;
  }
  return 0;
}
