#include <bits/stdc++.h>
using namespace std;
void fast() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
}
vector<string> vec_splitter(string s) {
  s += ',';
  vector<string> res;
  while (!s.empty()) {
    res.push_back(s.substr(0, s.find(',')));
    s = s.substr(s.find(',') + 1);
  }
  return res;
}
void debug_out(vector<string> __attribute__((unused)) args,
               __attribute__((unused)) int idx,
               __attribute__((unused)) int LINE_NUM) {
  cerr << endl;
}
template <typename Head, typename... Tail>
void debug_out(vector<string> args, int idx, int LINE_NUM, Head H, Tail... T) {
  if (idx > 0)
    cerr << ", ";
  else
    cerr << "Line(" << LINE_NUM << ") ";
  stringstream ss;
  ss << H;
  cerr << args[idx] << " = " << ss.str();
  debug_out(args, idx + 1, LINE_NUM, T...);
}
double get_time() { return 1.0 * clock() / CLOCKS_PER_SEC; }
void solve() {
  int n, x, y;
  cin >> n >> x >> y;
  vector<int> b(n), cnt(n + 2);
  for (int i = 0; i < n; i++) {
    cin >> b[i];
    cnt[b[i]]++;
  }
  vector<int> a = b;
  set<pair<int, int>, greater<pair<int, int>>> s;
  multiset<int> del;
  for (int i = 1; i <= n + 1; i++) s.insert({cnt[i], i});
  for (int i = 0; i < x; i++) {
    pair<int, int> pp = *s.begin();
    s.erase(s.begin());
    cnt[pp.second]--;
    del.insert(pp.second);
    s.insert({pp.first - 1, pp.second});
  }
  int f = *max_element(cnt.begin(), cnt.end());
  for (int i = 1; i <= n + 1; i++) 42;
  if (2 * f - (n - x) > n - y) {
    cout << "NO" << '\n';
    return;
  }
  vector<int> pos;
  for (int i = 0; i < n; i++) {
    if (del.find(b[i]) == del.end())
      pos.push_back(i);
    else
      del.erase(del.find(b[i]));
  }
  sort(pos.begin(), pos.end(), [&](int i, int j) { return b[i] < b[j]; });
  assert((int)pos.size() == n - x);
  for (int x : pos) 42;
  int avb = 0;
  for (int i = 1; i <= n + 1; i++)
    if (cnt[i] == 0) avb = i;
  for (int i = 0; i < (int)pos.size(); i++) {
    a[pos[i]] = b[pos[(i + (n - x) / 2) % (n - x)]];
  }
  int need = n - y;
  for (int i = 0; i < (int)pos.size(); i++) {
    if (a[pos[i]] == b[pos[i]]) a[pos[i]] = avb, need--;
  }
  for (int i = 0; i < (int)pos.size(); i++) {
    if (a[pos[i]] != avb && need > 0) a[pos[i]] = avb, need--;
  }
  assert(need == 0);
  for (int i = 0; i < n; i++)
    if (a[i] == 0) a[i] = b[i];
  cout << "YES" << '\n';
  int chk_x = 0, chk_y = 0;
  for (int i = 0; i < n; i++)
    if (a[i] == b[i]) chk_x++;
  multiset<int> aa((a).begin(), (a).end()), bb((b).begin(), (b).end());
  for (int x : a) {
    if (bb.find(x) != bb.end()) {
      chk_y++;
      bb.erase(bb.find(x));
    }
  }
  42;
  for (int i = 0; i < n; i++) cout << a[i] << ' ';
  cout << '\n';
}
int main() {
  fast();
  int t;
  cin >> t;
  while (t--) solve();
}
