#include <bits/stdc++.h>
using namespace std;
const int mod = 998244353;
int n, m, k, t, a[1000005], b[1000005], x, y, mis[1000005], cnt;
char s[1000005];
vector<int> pos[1000005], id[1000005], re;
int main() {
  scanf("%d", &t);
  while (t--) {
    scanf("%d %d %d", &n, &x, &y);
    re.clear();
    for (int i = 0; i <= n + 1; i++) {
      pos[i].clear();
      id[i].clear();
      mis[i] = a[i] = 0;
    }
    for (int i = 1; i <= n; i++) {
      scanf("%d", &b[i]);
      pos[b[i]].push_back(i);
    }
    for (int i = 1; i <= n + 1; i++) {
      id[pos[i].size()].push_back(i);
    }
    int cur = n;
    for (int i = 1; i <= x; i++) {
      while (id[cur].empty()) cur--;
      int color = id[cur].back();
      a[pos[color].back()] = color;
      pos[color].pop_back(), id[cur].pop_back(), id[cur - 1].push_back(color);
    }
    while (cur > 0 && id[cur].empty()) cur--;
    if (2 * cur > 2 * n - x - y) {
      printf("NO\n");
      continue;
    }
    for (int i = 1; i <= cur; i++) {
      for (int color : id[i]) {
        for (int ind : pos[color]) {
          re.push_back(ind);
        }
      }
    }
    cnt = n - y;
    for (int i = 0; i < n - x; i++) {
      a[re[i]] = b[re[(i + (n - x) / 2) % (n - x)]];
      if (a[re[i]] == b[re[i]]) {
        a[re[i]] = id[0][0];
        cnt--, mis[re[i]] = 1;
      }
    }
    for (int i = 0; cnt > 0; i++) {
      if (mis[re[i]] == 0) {
        a[re[i]] = id[0][0];
        cnt--, mis[re[i]] = 1;
      }
    }
    printf("YES\n");
    for (int i = 1; i <= n; i++) {
      printf("%d ", a[i]);
    }
    printf("\n");
  }
  return 0;
}
