#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  auto solve = []() {
    int n, x, y;
    cin >> n >> x >> y;
    vector<int> b(n);
    vector<vector<int>> p(n + 1);
    for (int i = 0; i < n; i++) {
      cin >> b[i];
      p[--b[i]].emplace_back(i);
    }
    int g = 0;
    priority_queue<pair<int, int>> pq;
    for (int c = 0; c <= n; c++) {
      pq.emplace((int)p[c].size(), c);
      if (p[c].empty()) g = c;
    }
    vector<int> res(n, g);
    for (int z = 0; z < x; z++) {
      int c = pq.top().second;
      pq.pop();
      int i = p[c].back();
      p[c].pop_back();
      res[i] = c;
      pq.emplace((int)p[c].size(), c);
    }
    int shift = pq.top().first;
    if (shift * 2 - n + y > n - x) {
      cout << "NO\n";
      return;
    }
    vector<int> rest;
    while (!pq.empty()) {
      int c = pq.top().second;
      pq.pop();
      rest.insert(rest.end(), p[c].begin(), p[c].end());
    }
    for (int i = 0; i < n - x; i++) {
      res[rest[(i + shift) % (n - x)]] = b[rest[i]];
    }
    for (int i = 0; i < n - y; i++) {
      res[rest[i]] = g;
    }
    cout << "YES\n";
    for (auto &x : res) cout << ++x << ' ';
    cout << '\n';
  };
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
}
