#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  for (int q = 1; q <= t; q++) {
    int n, x, y;
    cin >> n >> x >> y;
    vector<int> b(n), cnt(n + 2, 0);
    for (int i = 0; i < n; i++) {
      cin >> b[i];
      cnt[b[i]]++;
    }
    int c = (y - x) / 2, C = (y - x);
    vector<pair<int, int>> p;
    int non = 0;
    for (int i = 1; i <= n + 1; i++) {
      if (cnt[i]) {
        p.push_back({cnt[i], i});
      } else
        non = i;
    }
    sort(p.begin(), p.end());
    if ((y - x) & 1) {
      int contr = 0;
      for (int i = 0; i < p.size(); i++) {
        contr += min(c, p[i].first);
      }
      if (contr < C) {
        c++;
        C = 2 * c;
      }
    }
    vector<int> ch, a(n, 0);
    map<int, vector<int>> mp;
    bool ok = true;
    for (int i = 0; i < p.size(); i++) {
      for (int j = 1; j <= min(c, p[i].first) && ch.size() < C; j++) {
        ch.push_back(p[i].second);
      }
    }
    if (ch.size() != C || n - C < x)
      ok = false;
    else {
      sort(ch.begin(), ch.end());
      for (int i = 0; i < ch.size(); i++) {
        mp[ch[i]].push_back(ch[(i + c) % (C)]);
      }
      int k = y - x;
      for (int i = 0; i < n; i++) {
        if (!mp[b[i]].empty()) {
          if (k) {
            a[i] = mp[b[i]].back();
            mp[b[i]].pop_back();
            k--;
          } else {
            a[i] = non;
            mp[b[i]].pop_back();
          }
        } else {
          if (x) {
            a[i] = b[i];
            x--;
          } else
            a[i] = non;
        }
      }
    }
    if (ok) {
      cout << "YES"
           << "\n";
      for (int i = 0; i < n; i++) {
        cout << a[i] << " ";
      }
      cout << "\n";
    } else {
      cout << "NO"
           << "\n";
    }
  }
  return 0;
}
