#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int n, x, y, inv;
int b[N], p[N];
vector<int> pos[N], st[N];
bool mis[N];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int t;
  cin >> t;
  while (t) {
    cin >> n >> x >> y;
    for (int i = 0; i <= n + 1; i++) {
      pos[i].clear();
      st[i].clear();
      mis[i] = false;
      p[i] = 0;
    }
    for (int i = 0; i < n; i++) {
      cin >> b[i];
      pos[b[i]].push_back(i);
    }
    for (int i = 1; i <= n + 1; i++) {
      st[pos[i].size()].push_back(i);
    }
    int temp = x;
    int idx = n;
    while (temp) {
      while (st[idx].empty()) idx--;
      int col = st[idx].back();
      p[pos[col].back()] = col;
      pos[col].pop_back();
      st[idx].pop_back();
      st[idx - 1].push_back(col);
      temp--;
    }
    while (idx > 0 && st[idx].empty()) idx--;
    if (2 * idx - n + x > n - y) {
      cout << "NO"
           << "\n";
      t--;
      continue;
    }
    vector<int> free;
    for (int i = 1; i <= idx; i++) {
      for (int col : st[i]) {
        free.insert(free.end(), pos[col].begin(), pos[col].end());
      }
    }
    int mismatch = n - y;
    auto makemismatch = [&](int i) {
      p[i] = st[0][0];
      mismatch--;
      mis[i] = true;
    };
    for (int i = 0; i < n - x; i++) {
      p[free[i]] = b[free[(i + (n - x) / 2) % (n - x)]];
      if (p[free[i]] == b[free[i]]) makemismatch(free[i]);
    }
    for (int i = 0; mismatch > 0; i++) {
      if (!mis[free[i]]) makemismatch(free[i]);
    }
    cout << "YES\n";
    for (int i = 0; i < n; i++) {
      cout << p[i] << ' ';
    }
    cout << '\n';
    t--;
  }
  return 0;
}
