#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using u64 = uint64_t;
using u32 = uint32_t;
using pi = pair<int, int>;
using pl = pair<ll, ll>;
using vi = vector<int>;
using vl = vector<ll>;
using vvi = vector<vi>;
using vpi = vector<pi>;
static constexpr int INF = (int)1e9 + 5;
static constexpr ll INFL = (ll)1e18 + 5;
static mt19937 rng((u32)chrono::duration_cast<chrono::nanoseconds>(
                       chrono::high_resolution_clock::now().time_since_epoch())
                       .count());
vi solve() {
  int n, x, y;
  cin >> n >> x >> y;
  vvi idx(n + 1);
  vi b(n);
  for (int i = 0; i < (n); ++i) cin >> b[i], --b[i], idx[b[i]].push_back(i);
  int z = y - x;
  int c0 = 0;
  while (((int)(idx[c0]).size())) ++c0;
  vi a(n, c0);
  set<pi> col;
  auto take_col = [&]() {
    auto c = prev(end(col))->second;
    col.erase(prev(end(col)));
    int i = idx[c].back();
    idx[c].pop_back();
    return pi(i, c);
  };
  auto push_col = [&](int i) {
    if (((int)(idx[i]).size())) col.emplace(((int)(idx[i]).size()), i);
  };
  for (int i = 0; i < (n + 1); ++i) push_col(i);
  if (((int)(col).size()) >= 3 && z >= 3 && z % 2) {
    auto [i1, c1] = take_col();
    auto [i2, c2] = take_col();
    auto [i3, c3] = take_col();
    push_col(c1), push_col(c2), push_col(c3);
    a[i1] = c3;
    a[i2] = c1;
    a[i3] = c2;
    z -= 3;
  }
  int last_z_idx = -1;
  while (z > 0) {
    if (((int)(col).size()) < 2) return {};
    auto [i1, c1] = take_col();
    auto [i2, c2] = take_col();
    push_col(c1), push_col(c2);
    a[i1] = c2;
    a[i2] = c1;
    last_z_idx = i2;
    z -= 2;
  }
  for (int i = 0; i < (n); ++i) {
    if (x == 0) break;
    if (a[i] == c0) a[i] = b[i], --x;
  }
  if (x) return {};
  if (z == -1) a[last_z_idx] = c0;
  return a;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int t;
  cin >> t;
  while (t--) {
    auto a = solve();
    if (((int)(a).size())) {
      cout << "YES\n";
      for (auto& ai : a) cout << (ai + 1) << ' ';
      cout << '\n';
    } else
      cout << "NO\n";
  }
  return 0;
}
