#include <bits/stdc++.h>
using namespace std;
long long read() {
  long long x = 0, f = 0;
  char ch = getchar();
  while (!isdigit(ch)) f = ch == '-', ch = getchar();
  while (isdigit(ch)) x = (x << 1) + (x << 3) + (ch ^ 48), ch = getchar();
  return f ? -x : x;
}
template <class T>
void ckmax(T &x, T y) {
  if (x < y) x = y;
}
template <class T>
void ckmin(T &x, T y) {
  if (x > y) x = y;
}
const int N = 100005;
int n, x, y, X, Y, sp;
int a[N], b[N];
vector<int> p[N];
struct cmp {
  bool operator()(int x, int y) { return p[x].size() < p[y].size(); }
};
void check() {
  vector<int> ca(n + 2, 0), cb(n + 2, 0);
  int xx = 0, yy = 0;
  for (int i = (1); i <= (n); i++) {
    xx += a[i] == b[i];
    ca[a[i]]++;
    cb[b[i]]++;
  }
  for (int i = (1); i <= (n + 1); i++) yy += min(ca[i], cb[i]);
  assert(xx == X && yy == Y);
}
void solve() {
  n = read(), x = X = read(), y = Y = read();
  for (int i = (1); i <= (n); i++) a[i] = read();
  for (int i = (1); i <= (n + 1); i++) p[i].clear();
  for (int i = (1); i <= (n); i++) p[a[i]].push_back(i);
  for (int i = (1); i <= (n + 1); i++)
    if (p[i].empty()) {
      sp = i;
      break;
    }
  priority_queue<int, vector<int>, cmp> q;
  for (int i = (1); i <= (n + 1); i++) q.push(i);
  while (x > 0) {
    int i = q.top();
    q.pop();
    assert(p[i].size() > 0);
    int id = p[i].back();
    p[i].pop_back();
    b[id] = i;
    q.push(i);
    x--;
    y--;
  }
  if (y < 0) return (void)puts("NO");
  while (y > 0) {
    int i = q.top();
    q.pop();
    int j = q.top();
    q.pop();
    if (p[i].empty() || p[j].empty()) return (void)puts("NO");
    if (y == 3 && p[j].size() == 1) {
      int k = q.top();
      q.pop();
      if (p[i].empty() || p[j].empty() || p[k].empty()) return (void)puts("NO");
      int idi = p[i].back();
      p[i].pop_back();
      int idj = p[j].back();
      p[j].pop_back();
      int idk = p[k].back();
      p[k].pop_back();
      b[idi] = j, b[idj] = k, b[idk] = i;
      y -= 3;
      q.push(i), q.push(j), q.push(k);
      break;
    }
    int idi = p[i].back();
    p[i].pop_back();
    int idj = p[j].back();
    p[j].pop_back();
    b[idi] = j;
    if (y >= 2) {
      b[idj] = i;
      y -= 2;
    } else {
      b[idj] = sp;
      y -= 1;
    }
    q.push(i);
    q.push(j);
  }
  for (int i = (1); i <= (n + 1); i++)
    while (!p[i].empty()) {
      b[p[i].back()] = sp;
      p[i].pop_back();
    }
  puts("YES");
  for (int i = (1); i <= (n); i++) printf("%d ", b[i]);
  puts("");
  check();
}
int main() {
  int T = read();
  while (T--) solve();
  return 0;
}
