#include <bits/stdc++.h>
using namespace std;
int T, n, x, y, em, top, num[100100], cnt[100100], ans[100100], st[100100];
pair<int, int> pi[100100];
priority_queue<pair<int, int> > pq;
vector<int> pos[100100];
int main() {
  int i, j, k, s, t;
  cin >> T;
  while (T--) {
    scanf("%d%d%d", &n, &x, &y);
    for (; !pq.empty(); pq.pop())
      ;
    for (i = 1; i <= n + 1; i++) {
      cnt[i] = st[i] = ans[i] = 0;
      pos[i].clear();
    }
    for (i = 1; i <= n; i++) {
      scanf("%d", &num[i]);
      pos[num[i]].push_back(i);
      cnt[num[i]]++;
    }
    for (i = 1; cnt[i]; i++)
      ;
    em = i;
    for (i = 1; i <= n + 1; i++) {
      if (cnt[i]) {
        pq.push(make_pair(cnt[i], i));
      }
    }
    for (i = 1; i <= x; i++) {
      pair<int, int> tmp;
      tmp = pq.top();
      pq.pop();
      ans[pos[tmp.second][st[tmp.second]]] = tmp.second;
      tmp.first--, st[tmp.second]++;
      if (tmp.first) pq.push(tmp);
    }
    top = 0;
    for (; !pq.empty();) {
      pi[++top] = pq.top();
      pq.pop();
    }
    for (i = 1, j = x + 1, k = top; j <= y && i <= pi[1].first && k > 1;) {
      for (; st[pi[k].second] < pos[pi[k].second].size() && i <= pi[1].first &&
             j <= y;
           i++, j++) {
        ans[pos[pi[k].second][st[pi[k].second]]] = pi[1].second;
        st[pi[k].second]++;
      }
      if (st[pi[k].second] == pos[pi[k].second].size()) k--;
    }
    for (i = 2, k = 1; j <= y && i <= top;) {
      for (;
           st[pi[k].second] < pos[pi[k].second].size() && pi[i].first && j <= y;
           j++) {
        ans[pos[pi[k].second][st[pi[k].second]]] = pi[i].second;
        st[pi[k].second]++;
        pi[i].first--;
      }
      if (!pi[i].first) i++;
      if (st[pi[k].second] == pos[pi[k].second].size()) k++;
    }
    if (j <= y) {
      puts("NO");
      continue;
    }
    puts("YES");
    for (i = 1; i <= n; i++) {
      if (!ans[i])
        printf("%d ", em);
      else
        printf("%d ", ans[i]);
    }
    puts("");
  }
}
