#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  long long t;
  cin >> t;
  for (long long test = 0; test < t; test++) {
    long long n, x, y;
    cin >> n >> x >> y;
    long long b[n], a[n];
    bool bb[n];
    memset(bb, 0, sizeof(bb));
    memset(a, 0, sizeof(a));
    bool cc[n + 2];
    memset(cc, 0, sizeof(cc));
    map<long long, vector<long long> > pos;
    for (long long i = 0; i < n; i++) {
      cin >> b[i];
      cc[b[i]] = true;
      pos[b[i]].push_back(i);
    }
    map<long long, vector<long long> > si;
    long long extra;
    for (long long i = 1; i <= n + 1; i++) {
      si[pos[i].size()].push_back(i);
      if (!cc[i]) {
        extra = i;
      }
    }
    long long ind = n;
    for (long long i = 1; i <= x; i++) {
      while (si[ind].size() == 0) {
        ind--;
      }
      long long col = si[ind].back();
      a[pos[col].back()] = col;
      bb[pos[col].back()] = true;
      pos[col].pop_back();
      si[ind].pop_back();
      si[ind - 1].push_back(col);
    }
    while (si[ind].empty()) {
      ind--;
    }
    if ((2 * ind - (n - x)) > (n - y)) {
      cout << "NO\n";
      continue;
    }
    vector<long long> left;
    for (long long i = 1; i <= ind; i++) {
      vector<long long>::iterator it;
      for (it = si[i].begin(); it != si[i].end(); it++) {
        long long col = (*it);
        left.insert(left.end(), pos[col].begin(), pos[col].end());
      }
    }
    long long cnt = 0;
    for (long long i = 0; i < left.size(); i++) {
      a[left[i]] = b[left[(i + (n - x) / 2) % (n - x)]];
      if (a[left[i]] == b[left[i]]) {
        a[left[i]] = extra;
        bb[left[i]] = true;
        cnt++;
      }
    }
    for (long long i = 0; i < n; i++) {
      if (cnt == n - y) {
        break;
      }
      if (!bb[i]) {
        a[i] = extra;
        cnt++;
      }
    }
    cout << "YES\n";
    for (long long i = 0; i < n; i++) {
      cout << a[i] << " ";
    }
    cout << "\n";
  }
}
