#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, x, y;
    cin >> n >> x >> y;
    vector<int> a(n);
    for (int i = 0; i < n; ++i) cin >> a[i];
    vector<vector<int> > ind(n + 2);
    for (int i = 0; i < n; ++i) {
      ind[a[i]].push_back(i);
    }
    vector<vector<int> > freq(n + 2);
    for (int i = 1; i <= n + 1; ++i) {
      freq[ind[i].size()].push_back(i);
    }
    vector<int> res(n);
    int indx = n;
    for (int k = 0; k < x; ++k) {
      while (freq[indx].size() == 0) --indx;
      int col = freq[indx].back();
      int index = ind[col].back();
      res[index] = col;
      freq[indx].pop_back();
      freq[indx - 1].push_back(col);
      ind[col].pop_back();
    }
    while (indx > 0 && freq[indx].size() == 0) --indx;
    if (indx * 2 > 2 * n - x - y) {
      cout << "NO\n";
      continue;
    }
    vector<int> vec;
    for (int i = 1; i < ind.size(); ++i) {
      vec.insert(vec.end(), ind[i].begin(), ind[i].end());
    }
    int col = freq[0].back();
    int cnt = n - y;
    for (int i = 0; i < vec.size(); ++i) {
      int index = vec[i], shift = vec[(i + (n - x) / 2) % (n - x)];
      res[index] = a[shift];
      if (res[index] == a[index]) {
        res[index] = col;
        --cnt;
      }
    }
    for (int i = 0; cnt > 0; ++i) {
      if (res[vec[i]] != col) {
        --cnt;
        res[vec[i]] = col;
      }
    }
    cout << "YES\n";
    for (int i : res) cout << i << " ";
    cout << endl;
  }
}
