#include <bits/stdc++.h>
using namespace std;
int x, y, n, zero;
int a[100010], ans[100010];
queue<int> color[100010];
void build_match() {
  priority_queue<pair<int, int> > fila;
  for (int i = 1; i <= n + 1; i++) {
    ans[i] = 0;
    fila.push({color[i].size(), i});
  }
  for (int i = 0; i < x; i++) {
    int c = fila.top().second;
    fila.pop();
    ans[color[c].front()] = c;
    color[c].pop();
    fila.push({color[c].size(), c});
  }
}
bool build_mismatch() {
  priority_queue<pair<int, int> > fila;
  int maxi = 1;
  for (int i = 1; i <= n + 1; i++) {
    if (color[i].size() == 0) zero = i;
    fila.push({color[i].size(), i});
    if (color[maxi].size() < color[i].size()) maxi = i;
  }
  int val = color[maxi].size();
  if (2 * val - (n - x) > n - y) return false;
  vector<pair<int, int> > v;
  for (int i = 1; i <= n; i++)
    if (ans[i] == 0) v.push_back({a[i], i});
  sort(begin(v), end(v));
  if (v.size() == 0) return true;
  for (int i = 0; i < v.size(); i++) {
    ans[v[i].second] = v[(i + (n - x) / 2) % v.size()].first;
  }
  int sum = 0;
  for (int i = 0; i < v.size(); i++) {
    if (ans[v[i].second] == v[i].first) {
      ans[v[i].second] = zero;
      sum++;
    }
  }
  for (int i = 0; i < v.size(); i++) {
    if (ans[v[i].second] != zero && sum < n - y) {
      ans[v[i].second] = zero;
      sum++;
    }
  }
  return true;
}
void solve() {
  cin >> n >> x >> y;
  for (int i = 1; i <= n + 1; i++) {
    while (color[i].size()) color[i].pop();
  }
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    color[a[i]].push(i);
  }
  build_match();
  if (build_mismatch()) {
    cout << "YES" << endl;
    for (int i = 1; i <= n; i++) cout << ans[i] << " ";
    cout << endl;
  } else {
    cout << "NO" << endl;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
}
