#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int n, x, y, a[N], cnt[N], res[N], now[N];
vector<int> pos[N];
bool vis[N];
void solve() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> n >> x >> y;
  for (int i = 1; i <= n + 1; i++) {
    cnt[i] = 0;
    pos[i].clear();
    vis[i] = true;
    res[i] = 0;
  }
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    cnt[a[i]]++;
    pos[a[i]].push_back(i);
  }
  int val;
  priority_queue<pair<int, int> > pq;
  for (int i = 1; i <= n + 1; i++) {
    pq.push(make_pair(cnt[i], i));
    if (!cnt[i]) val = i;
  }
  int m = n - x;
  while (x--) {
    pair<int, int> cur = pq.top();
    pq.pop();
    int id = pos[cur.second].back();
    res[id] = cur.second;
    vis[id] = false;
    pos[cur.second].pop_back();
    cur.first--;
    pq.push(cur);
  }
  int rep = n - y;
  int freq = pq.top().first;
  if (rep < freq * 2 - m) {
    cout << "NO" << '\n';
    return;
  }
  vector<pair<int, int> > order;
  for (int i = 1; i <= n; i++)
    if (vis[i]) order.push_back(make_pair(a[i], i));
  sort(order.begin(), order.end());
  for (int i = 0; i < order.size(); i++) now[order[i].second] = i;
  vector<pair<int, int> > tmp(n);
  for (int i = 0; i < order.size(); i++) tmp[(i + (m / 2)) % m] = order[i];
  for (int i = 0; i < order.size(); i++) {
    int id = order[i].second;
    res[id] = tmp[i].first;
    if (res[id] == a[id]) {
      res[id] = val;
      rep--;
    }
  }
  cout << "YES" << '\n';
  for (int i = 1; i <= n; i++) {
    if (res[i] != val && res[i] != a[i] && rep > 0) {
      res[i] = val;
      rep--;
    }
    cout << res[i] << ' ';
  }
  cout << '\n';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int t;
  cin >> t;
  while (t--) solve();
}
