#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, f = 1, c = getchar();
  while (!isdigit(c)) {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (isdigit(c)) {
    x = (x << 1) + (x << 3) + (c ^ 48);
    c = getchar();
  }
  return f == 1 ? x : -x;
}
const int N = 1e5 + 4;
int n, res, px, py, X, Y, yu, a[N], c[N], ans[N];
vector<int> vec[N], V;
priority_queue<pair<int, int> > q;
inline void solve() {
  for (int i = 0; i <= n + 1; i++) vec[i].clear();
  memset(ans, 0, sizeof(int) * (n + 1));
  memset(c, 0, sizeof(int) * (n + 2));
  while (!q.empty()) q.pop();
  V.clear();
  n = res = read();
  px = X = read();
  Y = n - (py = read());
  for (int i = 1, u; i <= n; i++) {
    a[i] = u = read();
    vec[u].push_back(i);
    c[u]++;
  }
  for (int i = 1; i <= n + 1; i++) {
    if (!c[i])
      yu = i;
    else {
      q.push(make_pair(c[i], i));
    }
  }
  for (; X--;) {
    res--;
    int x = q.top().second;
    q.pop();
    ans[*vec[x].rbegin()] = x;
    vec[x].pop_back();
    c[x]--;
    if (c[x]) q.push(make_pair(c[x], x));
  }
  for (; Y && q.top().first * 2 > res; Y--) {
    res--;
    int x = q.top().second;
    q.pop();
    ans[*vec[x].rbegin()] = yu;
    vec[x].pop_back();
    c[x]--;
    if (c[x]) q.push(make_pair(c[x], x));
  }
  if (!q.empty() && q.top().first * 2 > res) {
    puts("NO");
    return;
  }
  while (!q.empty()) {
    int x = q.top().second;
    q.pop();
    V.push_back(x);
    for (int i = c[x]; i; i--) vec[0].push_back(x);
  }
  int y = 0;
  for (int i = 1, x; i < (signed)V.size(); i++) {
    x = V[i];
    for (auto v : vec[x]) ans[v] = vec[0][y++];
  }
  if (!V.empty())
    for (auto v : vec[V[0]]) ans[v] = vec[0][y++];
  for (int i = 1; i <= n && Y; i++)
    if (a[i] != ans[i] && ans[i] != yu) {
      ans[i] = yu;
      Y--;
    }
  puts("YES");
  for (int i = 1; i <= n; i++) cout << ans[i] << " ";
  puts("");
  X = Y = 0;
  for (int i = 1; i <= n; i++) {
    if (ans[i] == a[i]) X++;
  }
  sort(a + 1, a + n + 1);
  sort(ans + 1, ans + n + 1);
  for (int i = 1, j = 1; i <= n && j <= n;) {
    if (a[i] == ans[j]) {
      Y++;
      i++;
      j++;
    } else if (a[i] < ans[j])
      i++;
    else
      j++;
  }
  assert(px == X && py == Y);
}
int main() {
  for (int T = read(); T--;) solve();
  return (0 - 0);
}
