#include <bits/stdc++.h>
using namespace std;
template <typename T1, typename T2>
istream& operator>>(istream& in, pair<T1, T2>& a) {
  in >> a.first >> a.second;
  return in;
}
template <typename T1, typename T2>
ostream& operator<<(ostream& out, pair<T1, T2> a) {
  out << a.first << " " << a.second;
  return out;
}
template <typename T, typename T1>
T amax(T& a, T1 b) {
  if (b > a) a = b;
  return a;
}
template <typename T, typename T1>
T amin(T& a, T1 b) {
  if (b < a) a = b;
  return a;
}
const long long INF = 1e18;
const int32_t M = 1e9 + 7;
const int32_t MM = 998244353;
const long long N = 1e5 + 5;
long long b[N];
vector<long long> v[N];
void solve() {
  long long n, x, y;
  cin >> n >> x >> y;
  set<long long> s;
  for (long long i = 1; i < n + 2; i++) {
    s.insert(i);
    v[i].clear();
  }
  for (long long i = 0; i < n; i++) {
    cin >> b[i];
    v[b[i]].push_back(i);
    s.erase(b[i]);
  }
  vector<long long> a(n);
  long long rem = *s.begin();
  set<pair<long long, long long>, greater<pair<long long, long long>>> z;
  for (long long i = 1; i < n + 2; i++) {
    if ((long long)((v[i]).size())) {
      z.insert({(long long)((v[i]).size()), i});
    }
  }
  for (long long kkk = 0; kkk < x; kkk++) {
    auto big = *z.begin();
    z.erase(z.begin());
    a[v[big.second].back()] = big.second;
    v[big.second].pop_back();
    if ((long long)((v[big.second]).size()))
      z.insert({(long long)((v[big.second]).size()), big.second});
  }
  y -= x;
  while (y > 0) {
    if (y == 3 && (long long)((z).size()) > 2) {
      long long p, q, r;
      p = z.begin()->second;
      z.erase(z.begin());
      q = z.begin()->second;
      z.erase(z.begin());
      r = z.begin()->second;
      z.erase(z.begin());
      a[v[p].back()] = q;
      a[v[q].back()] = r;
      a[v[r].back()] = p;
      y -= 3;
      break;
    }
    if ((long long)((z).size()) < 2) {
      cout << "NO\n";
      return;
    }
    if (y == 1) {
      long long p, q;
      p = z.begin()->second;
      z.erase(z.begin());
      q = z.begin()->second;
      z.erase(z.begin());
      a[v[p].back()] = q;
      y--;
      break;
    } else {
      long long p, q;
      p = z.begin()->second;
      z.erase(z.begin());
      q = z.begin()->second;
      z.erase(z.begin());
      a[v[p].back()] = q;
      a[v[q].back()] = p;
      v[p].pop_back();
      v[q].pop_back();
      if ((long long)((v[p]).size())) z.insert({(long long)((v[p]).size()), p});
      if ((long long)((v[q]).size())) z.insert({(long long)((v[q]).size()), q});
      y -= 2;
    }
  }
  cout << "YES\n";
  for (long long i = 0; i < n; i++) {
    if (!a[i]) a[i] = rem;
    cout << a[i] << " ";
  }
  cout << "\n";
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  cin >> t;
  while (t--) solve();
  return 0;
}
