#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int T, n, x, y;
vector<int> apptimes[N];
vector<int> ans;
vector<pair<int, int> > res;
priority_queue<pair<int, int>, vector<pair<int, int> >, less<pair<int, int> > >
    q;
int read() {
  int x = 0, f = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = (x << 1) + (x << 3) + (c ^ 48);
    c = getchar();
  }
  return x * f;
}
int main() {
  T = read();
  while (T--) {
    res.clear();
    while (!q.empty()) q.pop();
    n = read(), x = read(), y = read() - x;
    for (int i = 1; i <= n + 1; i++) apptimes[i].clear();
    ans.resize(n + 2);
    ans.clear();
    for (int i = 1; i <= n; i++) apptimes[read()].push_back(i);
    int avail = -1;
    for (int i = 1; i <= n + 1; i++) {
      if (!apptimes[i].size())
        avail = i;
      else
        q.push(make_pair(apptimes[i].size(), i));
    }
    int tmp = x;
    while (tmp--) {
      pair<int, int> p = q.top();
      q.pop();
      ans[apptimes[p.second].back()] = p.second;
      apptimes[p.second].pop_back();
      if (apptimes[p.second].size())
        q.push(make_pair(apptimes[p.second].size(), p.second));
    }
    int maxn = 0;
    for (int i = 1; i <= n + 1; i++) {
      maxn = max(maxn, (int)apptimes[i].size());
      for (int j = 0; j < (int)apptimes[i].size(); j++)
        res.push_back(make_pair(apptimes[i][j], i));
    }
    if (n - x - y < (maxn << 1) - n + x) {
      puts("NO");
      continue;
    }
    puts("YES");
    int cnt = 0;
    for (int i = 0; i < res.size(); i++) {
      maxn %= res.size();
      if (cnt == y) break;
      if (res[i].second != res[maxn].second)
        ans[res[i].first] = (res[maxn++].second), cnt++;
    }
    for (int i = 1; i <= n; i++) cout << (ans[i] ? ans[i] : avail) << " ";
    puts("");
  }
  return 0;
}
