#include <bits/stdc++.h>
using namespace std;
using ll = long long;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int n, x, y;
    cin >> n >> x >> y;
    vector<pair<int, int>> B;
    vector<int> occs(n + 2);
    for (int i = 0; i < n; i++) {
      int b;
      cin >> b;
      B.push_back({b, i});
      occs[b]++;
    }
    sort((B).begin(), (B).end());
    priority_queue<pair<int, int>> PQ;
    vector<int> removs(n + 2);
    int missing = -1;
    for (int i = 1; i <= n + 1; i++) {
      if (occs[i] > 0)
        PQ.push({occs[i], i});
      else
        missing = i;
    }
    for (int do_this = 0; do_this < x; do_this++) {
      int i = PQ.top().second;
      int cnt = PQ.top().first;
      PQ.pop();
      removs[i]++;
      PQ.push({cnt - 1, i});
    }
    vector<int> ans(n);
    vector<pair<int, int>> Bsub;
    for (int i = 0; i < n; i++) {
      if (removs[B[i].first] > 0) {
        removs[B[i].first]--;
        ans[B[i].second] = B[i].first;
      } else {
        Bsub.push_back(B[i]);
      }
    }
    sort((Bsub).begin(), (Bsub).end());
    vector<pair<int, int>> rev = Bsub;
    reverse((rev).begin(), (rev).end());
    int clash = -1;
    for (int i = 0; i < int((Bsub).size()); i++) {
      if (rev[i].first == Bsub[i].first) clash = rev[i].first;
    }
    int prequel = -1;
    for (int i = 0; i < int((Bsub).size()); i++) {
      if (rev[i].first != clash && Bsub[i].first != clash)
        prequel = i;
      else
        break;
    }
    int sequel = int((Bsub).size());
    for (int i = int((Bsub).size()) - 1; i >= 0; i--) {
      if (rev[i].first != clash && Bsub[i].first != clash)
        sequel = i;
      else
        break;
    }
    int intersection = 0;
    for (int i = 0; i < int((Bsub).size()); i++) {
      if (rev[i].first == Bsub[i].first) intersection++;
    }
    if (clash != -1 && (prequel + 1) + (int((Bsub).size()) - sequel) + (n - y) <
                           intersection) {
      cout << "NO\n";
      continue;
    }
    cout << "YES\n";
    int start_swap = 0;
    int end_swap = int((Bsub).size()) - 1;
    int dropouts = 0;
    for (int i = 0; i < int((Bsub).size()); i++) {
      if (rev[i].first == Bsub[i].first) {
        if (start_swap <= prequel) {
          swap(rev[i], rev[start_swap]);
          start_swap++;
          continue;
        }
        if (end_swap >= sequel) {
          swap(rev[i], rev[end_swap]);
          end_swap--;
          continue;
        }
        rev[i].first = missing;
        dropouts++;
      }
    }
    for (int i = 0; i < int((Bsub).size()); i++) {
      if (dropouts < n - y && rev[i].first != missing) {
        rev[i].first = missing;
        dropouts++;
      }
    }
    for (int i = 0; i < int((Bsub).size()); i++) {
      ans[Bsub[i].second] = rev[i].first;
    }
    for (auto a : ans) cout << a << " ";
    cout << "\n";
  }
}
