#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
int n, x, y;
int a[N], b[N];
int nexist;
vector<int> pos[N];
priority_queue<pair<int, int> > Q;
int main() {
  int T;
  scanf("%d", &T);
  while (T--) {
    scanf("%d%d%d", &n, &x, &y);
    for (int i = 1; i <= n + 1; i++) a[i] = 0, pos[i].clear();
    while (!Q.empty()) Q.pop();
    for (int i = 1; i <= n; i++) scanf("%d", &b[i]), pos[b[i]].emplace_back(i);
    for (int i = 1; i <= n + 1; i++)
      if (pos[i].empty())
        nexist = i;
      else
        Q.push(pair<int, int>(pos[i].size(), i));
    for (int i = 1; i <= x; i++) {
      int id = Q.top().second;
      Q.pop();
      a[pos[id].back()] = id;
      pos[id].pop_back();
      Q.push(pair<int, int>(pos[id].size(), id));
    }
    int mx = Q.top().first;
    if (mx - (n - x - mx) > n - y) {
      printf("NO\n");
      continue;
    }
    printf("YES\n");
    vector<int> vpos, vval;
    while (!Q.empty()) {
      int id = Q.top().second;
      Q.pop();
      for (int i = 0; i < pos[id].size(); i++)
        vpos.emplace_back(pos[id][i]), vval.emplace_back(id);
    }
    for (int i = 0; i < y - x; i++)
      a[vpos[(i + mx) % (n - x)]] = vval[(i + mx * 2) % (n - x)];
    for (int i = 1; i <= n; i++)
      printf("%d%c", a[i] == 0 ? nexist : a[i], i == n ? '\n' : ' ');
  }
  return 0;
}
