#include <bits/stdc++.h>
using namespace std;
int b[100000], a[100000];
vector<int> occ[100005];
priority_queue<pair<int, int> > H;
int main() {
  int i;
  int t, n, x, y;
  scanf("%d", &t);
  while (t--) {
    scanf("%d %d %d", &n, &x, &y);
    for (i = 0; i < n; i++) scanf("%d", &b[i]), occ[b[i]].push_back(i);
    int z = -1, xx = x;
    fill(a, a + n, -1);
    for (i = 1; i <= n + 1; i++) {
      H.push(make_pair(occ[i].size(), i));
      if (occ[i].empty()) z = i;
    }
    "here";
    for (i = 0; i < x; i++) {
      int u = H.top().second;
      H.pop();
      a[occ[u].back()] = b[occ[u].back()];
      ;
      occ[u].pop_back(), H.push(make_pair(occ[u].size(), u));
    }
    x = n - x;
    if (2 * H.top().first > x + (n - y))
      printf("NO\n");
    else {
      while (2 * H.top().first > x) {
        int u = H.top().second;
        H.pop();
        a[occ[u].back()] = b[occ[u].back()];
        occ[u].pop_back(), H.push(make_pair(occ[u].size(), u));
        x--;
      }
      while (x > 0) {
        int u = H.top().second;
        H.pop();
        int v = H.top().second;
        H.pop();
        if (x != 3) {
          a[occ[u].back()] = b[occ[v].back()];
          a[occ[v].back()] = b[occ[u].back()];
          occ[u].pop_back(), H.push(make_pair(occ[u].size(), u));
          occ[v].pop_back(), H.push(make_pair(occ[v].size(), v));
          x -= 2;
        } else {
          int w = H.top().second;
          H.pop();
          a[occ[u].back()] = b[occ[v].back()];
          a[occ[v].back()] = b[occ[w].back()];
          a[occ[w].back()] = b[occ[u].back()];
          x = 0;
        }
      };
      int c = n - y;
      int cc = 0;
      for (i = 0; i < n; i++) {
        if (a[i] == b[i]) cc++;
      }
      for (i = 0; i < n; i++) {
        if ((a[i] == b[i]) && (cc > xx)) a[i] = z, cc--, c--;
      }
      for (i = 0; i < n; i++) {
        if ((a[i] != z) && (a[i] != b[i]) && (c > 0)) a[i] = z, c--;
      }
      printf("YES\n");
      for (i = 0; i < n; i++) printf("%d ", a[i]);
      printf("\n");
    }
    for (i = 0; i < n + 5; i++) occ[i].clear();
    while (!H.empty()) H.pop();
  }
  return 0;
}
