#include <bits/stdc++.h>
#pragma GCC optimize(2)
using namespace std;
inline int read() {
  int x = 0;
  int f = 0;
  char ch = 0;
  while (!isdigit(ch)) {
    f |= (ch == '-') ? 1 : 0;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = (x << 3) + (x << 1) + (ch ^ 48);
    ch = getchar();
  }
  return f ? -x : x;
}
const int maxn = 1e5 + 10;
int aa[maxn];
int n, t, x, y;
struct node {
  int id, key;
  bool operator<(const node a) const { return key < a.key; }
};
priority_queue<node> qq;
set<int> sset[maxn];
int ans[maxn];
int vis[maxn];
int st[maxn];
int main() {
  t = read();
  while (t--) {
    n = read();
    x = read();
    y = read();
    x = y - x;
    y -= x;
    for (int i = 1; i <= n + 1; ++i) vis[i] = 0, sset[i].clear(), ans[i] = -1;
    while (!qq.empty()) qq.pop();
    for (int i = 1; i <= n; ++i)
      aa[i] = read(), ++vis[aa[i]], sset[aa[i]].insert(i);
    int kk;
    for (int i = 1; i <= n + 1; ++i) {
      qq.push((node){i, vis[i]});
      if (!vis[i]) kk = i;
    }
    for (int i = 1; i <= y; ++i) {
      node tmp = qq.top();
      qq.pop();
      int u = tmp.id;
      int tmp1 = *(sset[u].begin());
      ans[tmp1] = u;
      sset[u].erase(*sset[u].begin());
      --tmp.key;
      qq.push(tmp);
    }
    if (qq.top().key * 2 - (n - y) > n - y - x) {
      printf("NO\n");
    } else {
      printf("YES\n");
      int num = 0;
      int o = qq.top().key;
      while (!qq.empty()) {
        node tmp = qq.top();
        qq.pop();
        int u = tmp.id;
        while (sset[u].size()) {
          st[++num] = *sset[u].begin();
          sset[u].erase(*sset[u].begin());
        }
      }
      int cnt = 0;
      for (int i = 1; i <= num; ++i)
        if (aa[st[i]] != aa[st[(i + o - 1) % num + 1]]) {
          if (cnt < x)
            ans[st[i]] = aa[st[(i + o - 1) % num + 1]], ++cnt;
          else
            ans[st[i]] = kk;
        } else
          ans[st[i]] = kk;
      for (int i = 1; i <= n; ++i) {
        if (i != 1) printf(" ");
        printf("%d", ans[i]);
      }
      printf("\n");
    }
  }
}
