#include <bits/stdc++.h>
using namespace std;
const int N = 500005;
int n, a, b, v[N], ans[N];
int vis[N], q[N];
vector<int> vs[N], vp[N];
void solve() {
  scanf("%d%d%d", &n, &a, &b);
  for (int i = (int)(1); i <= (int)(n); i++) scanf("%d", &v[i]);
  for (int i = (int)(1); i <= (int)(n); i++) ans[i] = -1;
  for (int i = (int)(1); i <= (int)(n + 1); i++) {
    vis[i] = 0;
    vp[i].resize(0);
    vs[i].resize(0);
  }
  for (int i = (int)(1); i <= (int)(n); i++) {
    vis[v[i]] = 1;
    vp[v[i]].push_back(i);
  }
  for (int i = (int)(1); i <= (int)(n + 1); i++)
    if (vp[i].size()) vs[vp[i].size()].push_back(i);
  int p = n;
  for (int i = (int)(1); i <= (int)(a); i++) {
    for (; !vs[p].size(); p--)
      ;
    int x = vs[p].back();
    ans[vp[x].back()] = x;
    vp[x].pop_back();
    vs[p].pop_back();
    vs[p - 1].push_back(x);
  }
  *q = 0;
  for (int i = (int)(1); i <= (int)(n + 1); i++)
    for (auto j : vp[i]) q[++*q] = j;
  p = 1;
  for (; vis[p]; ++p)
    ;
  b = n - b;
  for (int i = (int)(1); i <= (int)((*q)); i++) {
    int np = (i + (*q) / 2 - 1) % (*q) + 1;
    ans[q[i]] = v[q[np]];
    if (ans[q[i]] == v[q[i]]) {
      --b;
      ans[q[i]] = p;
      if (b < 0) return puts("NO"), void(0);
    }
  }
  for (int i = (int)(1); i <= (int)(n); i++)
    if (b && ans[i] != v[i] && ans[i] != p) ans[i] = p, b--;
  puts("YES");
  for (int i = (int)(1); i <= (int)(n); i++) printf("%d ", ans[i]);
  puts("");
}
int main() {
  int T;
  scanf("%d", &T);
  while (T--) solve();
}
