#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 8;
vector<int> g[N];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long tc = 1;
  cin >> tc;
  for (int tt = 1; tt <= tc; ++tt) {
    set<int> taken;
    int n, x, y;
    cin >> n >> x >> y;
    for (int i = 1; i <= n + 1; ++i) {
      g[i].clear();
      taken.insert(i);
    }
    vector<int> b(n), ans(n, 0);
    for (int i = 0; i < n; ++i) {
      cin >> b[i];
      g[b[i]].push_back(i);
      if (taken.find(b[i]) != taken.end()) taken.erase(b[i]);
    }
    set<pair<int, int>> vals;
    for (int i = 1; i <= n + 1; ++i) {
      if (!g[i].empty()) vals.insert({g[i].size(), i});
    }
    for (int i = 0; i < x; ++i) {
      auto x1 = prev(vals.end());
      int pos = x1->second;
      ans[g[pos].back()] = pos;
      g[pos].pop_back();
      vals.erase(prev(vals.end()));
      if (x1->first > 1) vals.insert({g[pos].size(), pos});
    }
    int z = y - x, ok = 1;
    while (z > 0) {
      if ((int)(vals).size() < 2) {
        ok = 0;
        break;
      }
      if (z == 3 && (int)(vals).size() == 3) {
        pair<int, int> x1 = *prev(vals.end());
        vals.erase(prev(vals.end()));
        pair<int, int> x2 = *prev(vals.end());
        vals.erase(prev(vals.end()));
        pair<int, int> x3 = *prev(vals.end());
        vals.erase(prev(vals.end()));
        int pos1 = g[x1.second].back();
        int pos2 = g[x2.second].back();
        int pos3 = g[x3.second].back();
        ans[pos1] = x3.second;
        ans[pos2] = x1.second;
        ans[pos3] = x2.second;
        break;
      }
      pair<int, int> x1 = *prev(vals.end());
      vals.erase(prev(vals.end()));
      pair<int, int> x2 = *prev(vals.end());
      vals.erase(prev(vals.end()));
      int pos1 = g[x1.second].back();
      g[x1.second].pop_back();
      int pos2 = g[x2.second].back();
      g[x2.second].pop_back();
      if (z == 1) {
        ans[pos1] = x2.second;
        break;
      }
      ans[pos1] = x2.second;
      ans[pos2] = x1.second;
      if (x1.first > 1) vals.insert({g[x1.second].size(), x1.second});
      if (x2.first > 1) vals.insert({g[x2.second].size(), x2.second});
      z -= 2;
    }
    if (!ok) {
      cout << "NO\n";
      continue;
    }
    cout << "YES\n";
    for (int i = 0; i < n; ++i) {
      if (!ans[i]) ans[i] = *taken.begin();
      cout << ans[i] << " ";
    }
    cout << '\n';
  }
  return 0;
}
