#include <bits/stdc++.h>
using namespace std;
template <typename T>
istream& operator>>(istream& in, vector<T>& a) {
  for (auto& i : a) in >> i;
  return in;
}
template <typename T>
ostream& operator<<(ostream& out, vector<T>& a) {
  for (auto& i : a) out << i << " ";
  return out;
}
template <typename T, typename U>
void chkmin(T& a, U b) {
  if (a > b) a = b;
}
template <typename T, typename U>
void chkmax(T& a, U b) {
  if (a < b) a = b;
}
void solve() {
  int n, x, y;
  cin >> n >> x >> y;
  vector<int> a(n);
  cin >> a;
  map<int, int> m;
  for (int i = (int)0; i < (int)n; i++) m[a[i]]++;
  int left;
  for (int i = (int)1; i < (int)n + 2; i++)
    if (m.find(i) == m.end()) left = i;
  set<pair<int, int>> s;
  for (auto i : m) s.emplace(i.second, i.first);
  vector<vector<int>> ans(n + 2);
  for (int i = (int)0; i < (int)x; i++) {
    auto [cnt, col] = *--s.end();
    s.erase(--s.end());
    --cnt;
    if (cnt > 0) s.emplace(cnt, col);
    ans[col].push_back(col);
    if (false) cerr << col << " ";
  }
  if (false) cerr << "\n";
  vector<int> rest;
  for (auto [cnt, col] : s)
    for (int i = (int)0; i < (int)cnt; i++) rest.push_back(col);
  vector<int> shifted;
  for (int i = (int)0; i < (int)(int)(rest).size(); i++)
    shifted.push_back(rest[(i + (int)(rest).size() / 2) % (int)(rest).size()]);
  int good = 0;
  for (int i = (int)0; i < (int)(int)(rest).size(); i++)
    if (rest[i] != shifted[i]) ++good;
  if (good < y - x) {
    cout << "NO\n";
    return;
  }
  if (false) cerr << rest << "\n" << shifted << "\n";
  int t = y - x;
  for (int i = (int)0; i < (int)(int)(rest).size(); i++)
    if (rest[i] != shifted[i] && t) {
      ans[rest[i]].push_back(shifted[i]);
      --t;
    }
  cout << "YES\n";
  for (int x : a) {
    if (ans[x].empty()) {
      cout << left;
    } else {
      cout << ans[x].back();
      ans[x].pop_back();
    }
    cout << " ";
  }
  cout << "\n";
  if (false) cerr << "---\n";
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0);
  int t;
  cin >> t;
  while (t-- > 0) solve();
  return 0;
}
