#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
set<pair<int, int> > S;
int T, n, X, Y, a[N], f[N], cnt[N], cnt2[N], ans[N];
int cmp(int x, int y) { return a[x] < a[y]; }
signed main() {
  scanf("%d", &T);
  while (T--) {
    scanf("%d%d%d", &n, &X, &Y);
    for (int i = 1; i <= n; i++) scanf("%d", &a[i]), cnt[a[i]]++;
    S.clear();
    int laji = 0;
    for (int i = 1; i <= n + 1; i++)
      if (!cnt[i]) laji = i;
    for (int i = 1; i <= n + 1; i++) S.insert(make_pair(-cnt[i], i));
    for (int i = 1; i <= X; i++) {
      pair<int, int> now = *S.begin();
      S.erase(S.begin());
      cnt2[now.second]++;
      cnt[now.second]--;
      S.insert(make_pair(-cnt[now.second], now.second));
    }
    for (int i = 1; i <= n; i++)
      if (cnt2[a[i]]) ans[i] = a[i], cnt2[a[i]]--;
    int last = 0;
    for (int i = 1; i <= n - Y; i++) {
      pair<int, int> now = *S.begin();
      S.erase(S.begin());
      cnt2[now.second]++;
      cnt[now.second]--;
      S.insert(make_pair(-cnt[now.second], now.second));
      last = now.second;
    }
    for (int i = 1; i <= n; i++)
      if (!ans[i] && cnt2[a[i]]) ans[i] = laji, cnt2[a[i]]--;
    int now = -(*S.begin()).first;
    if (now > (Y - X) / 2) {
      if (last == (*S.begin()).second || last == 0) {
        puts("NO");
        for (int i = 1; i <= n + 1; i++) ans[i] = cnt[i] = 0;
        continue;
      } else {
        now--;
        int t = (*S.begin()).second;
        for (int i = 1; i <= n; i++)
          if (!ans[i] && a[i] == t) {
            ans[i] = last;
            break;
          }
      }
    }
    puts("YES");
    int tot = 0;
    for (int i = 1; i <= n; i++)
      if (!ans[i]) f[tot++] = i;
    sort(f, f + tot, cmp);
    for (int i = 0; i < tot; i++) ans[(f[(i + now) % tot])] = a[f[i]];
    for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
    puts("");
    for (int i = 1; i <= n + 1; i++) cnt[i] = ans[i] = 0;
  }
}
