#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 7;
void solve() {
  int n, x, y;
  cin >> n >> x >> y;
  y -= x;
  vector<int> b(n), a(n), cnt(n + 2), use(n + 2);
  for (int i = 0; i < n; i++) cin >> b[i], cnt[b[i]]++;
  priority_queue<pair<int, int> > pq;
  int other = -1;
  for (int i = 1; i <= n + 1; i++) {
    pq.push({cnt[i], i});
    if (cnt[i] == 0) other = i;
  }
  for (int i = 0; i < x; i++) {
    pair<int, int> p = pq.top();
    pq.pop();
    use[p.second]++, cnt[p.second]--;
    pq.push({p.first - 1, p.second});
  }
  vector<pair<int, int> > v;
  for (int i = 0; i < n; i++) {
    if (use[b[i]]) {
      use[b[i]]--;
      a[i] = b[i];
    } else {
      v.emplace_back(b[i], i);
    }
  }
  int rem = v.size();
  sort((v).begin(), (v).end());
  if (*max_element((cnt).begin(), (cnt).end()) * 2 <= rem) {
    int change = rem - y;
    for (int i = 0; i < rem; i++)
      a[v[i].second] = b[v[(i + rem / 2) % rem].second];
    for (int i = 0; i < change; i++) a[v[i].second] = other;
  } else {
    int diff = 2 * (rem - *max_element((cnt).begin(), (cnt).end()));
    int change = diff - y;
    if (change < 0) {
      cout << "NO" << endl;
      return;
    }
    for (int i = 0; i < rem; i++) {
      a[v[i].second] = b[v[(i + rem / 2) % rem].second];
      if (a[v[i].second] == b[v[i].second]) a[v[i].second] = other;
    }
    for (int i = 0; i < rem; i++) {
      if (change && a[v[i].second] != other) {
        change--;
        a[v[i].second] = other;
      }
    }
  }
  cout << "YES" << endl;
  for (int i = 0; i < n; i++) cout << a[i] << " ";
  cout << endl;
}
signed main() {
  std::ios::sync_with_stdio(0);
  std::cin.tie(0);
  ;
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
}
