#include <bits/stdc++.h>
using namespace std;
int n, i, j, l, t, x, y, idx, col, mismat, s1, s2;
int old[100005];
int nev[100005];
vector<int> ind[100005];
vector<int> hist[100005];
bool mis[100005];
int main() {
  scanf("%d", &t);
  while (t--) {
    scanf("%d%d%d", &n, &x, &y);
    for (int i = 0; i <= n + 1; i++) {
      ind[i].clear();
      hist[i].clear();
      mis[i] = false;
      nev[i] = 0;
    }
    for (int i = 1; i <= n; i++) {
      scanf("%d", &old[i]);
      ind[old[i]].push_back(i);
    }
    for (int i = 1; i <= n + 1; i++) {
      hist[ind[i].size()].push_back(i);
    }
    idx = n;
    for (int i = 1; i <= x; i++) {
      while (hist[idx].size() == 0) {
        idx--;
      }
      col = hist[idx].back();
      nev[ind[col].back()] = col;
      ind[col].pop_back();
      hist[idx].pop_back();
      hist[idx - 1].push_back(col);
    }
    while (idx > 0 && hist[idx].size() == 0) {
      idx--;
    }
    if (idx > (n - x - idx) + (n - y)) {
      printf("NO\n");
      continue;
    }
    vector<int> vec;
    for (i = 1; i <= idx; i++) {
      s1 = hist[i].size();
      for (j = 0; j < s1; j++) {
        s2 = ind[hist[i][j]].size();
        for (l = 0; l < s2; l++) {
          vec.push_back(ind[hist[i][j]][l]);
        }
      }
    }
    mismat = n - y;
    for (i = 0; i < n - x; i++) {
      nev[vec[i]] = old[vec[(i + (n - x) / 2) % (n - x)]];
      if (nev[vec[i]] == old[vec[i]]) {
        nev[vec[i]] = hist[0][0];
        mismat--;
        mis[vec[i]] = true;
      }
    }
    for (i = 0; mismat > 0; i++) {
      if (mis[vec[i]] == false) {
        nev[vec[i]] = hist[0][0];
        mismat--;
        mis[vec[i]] = true;
      }
    }
    printf("YES\n");
    for (i = 1; i <= n; i++) {
      printf("%d ", nev[i]);
    }
    printf("\n");
  }
}
