#include <bits/stdc++.h>
using namespace std;
template <typename T>
ostream &operator+(ostream &out, const vector<T> &vec) {
  for (const auto &x : vec) {
    out << x << " ";
  }
  out << "\n";
  return out;
}
template <typename T>
ostream &operator*(ostream &out, const vector<T> &vec) {
  for (const auto &x : vec) {
    out + x;
  }
  return out;
}
template <typename T>
istream &operator>>(istream &in, vector<T> &vec) {
  for (auto &x : vec) {
    in >> x;
  }
  return in;
}
template <class T>
bool ckmin(T &a, const T &b) {
  return b < a ? a = b, 1 : 0;
}
template <class T>
bool ckmax(T &a, const T &b) {
  return a < b ? a = b, 1 : 0;
}
const int N = 5e3 + 5;
const int mod = 1e9 + 7;
const int mod2 = 998244353;
const long long INF = 1e18 + 6;
int pre[N][32];
int pre1[N][32];
int z[N];
int a[N];
int msb(long long i) { return 31 - __builtin_clz(i); }
void solve() {
  int n, x, y;
  cin >> n >> x >> y;
  vector<int> a(n);
  vector<vector<int>> fre(n + 2);
  cin >> a;
  priority_queue<pair<int, int>> pq;
  for (int i = 0; i < n; i++) {
    fre[a[i]].push_back(i);
  }
  int extra = 1;
  while (!fre[extra].empty()) extra++;
  for (int j = 1; j <= n + 1; ++j) {
    pq.emplace(fre[j].size(), j);
  }
  vector<int> ans(n, extra);
  for (int z = 0; z < x; z++) {
    int a = pq.top().second;
    pq.pop();
    int i = fre[a].back();
    fre[a].pop_back();
    ans[i] = a;
    pq.emplace(int(fre[a].size()), a);
  }
  if (pq.top().first * 2 - (n - y) > n - x) {
    cout << "NO"
         << "\n";
    ;
    return;
  }
  int offset = pq.top().first;
  vector<int> other_inds;
  other_inds.reserve(n - x);
  while (!pq.empty()) {
    int v = pq.top().second;
    pq.pop();
    other_inds.insert(other_inds.end(), fre[v].begin(), fre[v].end());
  }
  assert(int(other_inds.size()) == n - x);
  for (int i = 0; i < n - x; i++) {
    ans[other_inds[(i + offset) % (n - x)]] = a[other_inds[i]];
  }
  for (int i = 0; i < n - y; i++) {
    ans[other_inds[i]] = extra;
  }
  for (int i = 0; i < n - x; i++) {
    assert(ans[other_inds[i]] != a[other_inds[i]]);
  }
  cout << "YES" << '\n';
  for (int i = 0; i < n; i++) {
    cout << ans[i] << " \n"[i + 1 == n];
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  cin >> t;
  while (t--) solve();
  return 0;
}
