#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vb = vector<bool>;
using vvi = vector<vector<int>>;
using vll = vector<long long>;
using vpi = vector<pair<int, int>>;
using pii = pair<int, int>;
using pll = pair<long long, long long>;
const char nl = '\n';
const ll MOD = 1e9 + 7;
void solve() {
  int n, x, y;
  cin >> n >> x >> y;
  vi b(n);
  for (int i = 0; i < (n); ++i) cin >> b[i];
  vi secret(n, -1);
  vi count(n + 1, 0);
  vector<vector<int>> el(n + 1);
  for (int i = 0; i < (n); ++i) count[b[i] - 1]++;
  for (int i = 0; i < (n); ++i) el[b[i] - 1].push_back(i);
  int extra = -1;
  for (int i = (1); i <= (n + 1); ++i) {
    if (count[i - 1] == 0) {
      extra = i;
      break;
    }
  }
  priority_queue<pii> pq;
  for (int i = (1); i <= (n + 1); ++i) pq.push({count[i - 1], i});
  int used = 0;
  while (used < x) {
    auto back = pq.top();
    pq.pop();
    int idx = el[back.second - 1].back();
    el[back.second - 1].pop_back();
    secret[idx] = back.second;
    used++;
    pq.push({back.first - 1, back.second});
    count[back.second - 1] = back.first - 1;
  }
  auto back = pq.top();
  int forced = back.first;
  if (2 * forced - (n - x) > n - y) {
    cout << "NO" << nl;
    return;
  }
  vpi ori;
  vpi rot;
  for (int i = (1); i <= (n + 1); ++i) {
    for (int j = 0; j < ((int)el[i - 1].size()); ++j) {
      ori.push_back({i, el[i - 1][j]});
      rot.push_back({i, el[i - 1][j]});
    }
  }
  rotate(rot.begin(), rot.begin() + (n - x) / 2, rot.end());
  int make = n - y;
  for (int i = 0; i < ((int)rot.size()); ++i) {
    if (ori[i].first == rot[i].first) {
      secret[ori[i].second] = extra;
      make--;
    }
  }
  for (int i = 0; i < ((int)rot.size()); ++i) {
    if (ori[i].first == rot[i].first) continue;
    if (make > 0) {
      secret[ori[i].second] = extra;
      make--;
    } else {
      secret[ori[i].second] = rot[i].first;
    }
  }
  cout << "YES" << nl;
  for (int color : secret) cout << color << " ";
  cout << nl;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
