#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-9;
const int INFMEM = 63;
const int INF = 1061109567;
const long long LINF = 4557430888798830399LL;
const double DINF = numeric_limits<double>::infinity();
const long long MOD = 1000000007;
const int dx[8] = {0, 0, 1, -1, 1, -1, 1, -1};
const int dy[8] = {1, -1, 0, 0, 1, -1, -1, 1};
const char dch[4] = {'R', 'L', 'D', 'U'};
const double PI = 3.141592653589793;
inline void open(string a) {
  freopen((a + ".in").c_str(), "r", stdin);
  freopen((a + ".out").c_str(), "w", stdout);
}
inline void fasterios() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
int n, x, y;
int cntVal[100005];
int ans[100005], isi[100005];
priority_queue<pair<int, int> > cnt;
vector<int> pos[100005];
inline void printAns() {
  for (int i = 1; i <= n; i++) {
    cout << ans[i] << " \n"[i == n];
  }
}
int main() {
  fasterios();
  int testCases;
  cin >> testCases;
  int tc = 0;
  while (++tc <= testCases) {
    cin >> n >> x >> y;
    while (!cnt.empty()) cnt.pop();
    for (int i = 1; i <= n + 1; i++) {
      pos[i].clear();
      cntVal[i] = 0;
      ans[i] = -1;
    }
    for (int i = 1; i <= n; i++) {
      cin >> isi[i];
      cntVal[isi[i]]++;
      pos[isi[i]].push_back(i);
    }
    int f = -1;
    for (int i = 1; i <= n + 1; i++) {
      if (cntVal[i] == 0)
        f = i;
      else
        cnt.push({cntVal[i], i});
    }
    for (int i = 1; i <= x; i++) {
      int now = cnt.top().second;
      cnt.pop();
      int curPos = pos[now].back();
      pos[now].pop_back();
      ans[curPos] = now;
      if (--cntVal[now] > 0) cnt.push({cntVal[now], now});
    }
    vector<int> all;
    int largestOcc = 0;
    if (!cnt.empty()) largestOcc = cnt.top().first;
    while (!cnt.empty()) {
      int now = cnt.top().second;
      for (int i = 0; i < (cntVal[now]); ++i) all.push_back(now);
      cnt.pop();
    }
    vector<int> shifted(n - x);
    for (int i = 0; i < (n - x); ++i)
      shifted[(i + largestOcc) % (n - x)] = all[i];
    if (largestOcc * 2 - (n - y) > n - x) {
      cout << "NO" << '\n';
      continue;
    }
    for (int i = 0; i < (n - y); ++i) {
      int curPos = pos[all[i]].back();
      pos[all[i]].pop_back();
      ans[curPos] = f;
    }
    for (int i = n - y; i < (n - x); ++i) {
      int curPos = pos[all[i]].back();
      pos[all[i]].pop_back();
      ans[curPos] = shifted[i];
    }
    cout << "YES" << '\n';
    printAns();
  }
  return 0;
}
