#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10;
vector<int> pos[N], cnt[N];
int que[N], a[N], b[N];
int main() {
  int T;
  scanf("%d", &T);
  while (T) {
    T--;
    int n, x, y;
    scanf("%d%d%d", &n, &x, &y);
    for (int i = 1; i <= n + 1; i++) {
      pos[i].clear();
      cnt[i].clear();
      a[i] = 0;
    }
    for (int i = 1; i <= n; i++) {
      scanf("%d", &b[i]);
      pos[b[i]].push_back(i);
    }
    int miscolor;
    for (int i = 1; i <= n + 1; i++) {
      if (pos[i].size())
        cnt[pos[i].size()].push_back(i);
      else
        miscolor = i;
    }
    int now = n;
    while (cnt[now].empty()) now--;
    for (int i = 1; i <= x; i++) {
      while (cnt[now].empty()) now--;
      int nowx = cnt[now][cnt[now].size() - 1];
      cnt[now].pop_back();
      a[pos[nowx][pos[nowx].size() - 1]] = b[pos[nowx][pos[nowx].size() - 1]];
      pos[nowx].pop_back();
      cnt[now - 1].push_back(nowx);
    }
    while (now && cnt[now].empty()) now--;
    if (now * 2 > n * 2 - x - y) {
      printf("NO\n");
      continue;
    }
    int tail = 0;
    for (int i = 1; i <= n + 1; i++)
      if (pos[i].size())
        for (int j = 0; j < pos[i].size(); j++) que[++tail] = pos[i][j];
    int ot = n - y;
    for (int i = 1; i <= tail; i++) {
      int to = i + (n - x) / 2;
      if (to > n - x) to -= n - x;
      a[que[i]] = b[que[to]];
      if (a[que[i]] == b[que[i]]) {
        a[que[i]] = miscolor;
        ot--;
      }
    }
    for (int i = 1; i <= tail && ot; i++) {
      if (a[que[i]] != miscolor) {
        a[que[i]] = miscolor;
        ot--;
      }
    }
    printf("YES\n");
    for (int i = 1; i <= n; i++) printf("%d ", a[i]);
    printf("\n");
  }
  return 0;
}
