#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    int n, x, y;
    cin >> n >> x >> y;
    int a[n], mex = 1;
    bool b[n];
    bool me[n + 2];
    memset(b, false, n);
    memset(me, false, n + 2);
    for (auto &i : a) cin >> i, me[i] = true;
    while (me[mex]) mex++;
    vector<int> v[n + 2];
    for (int i = 0; i < n; i++) v[a[i]].push_back(i);
    priority_queue<pair<int, int>> q;
    for (int i = 1; i <= n + 1; i++)
      if (v[i].size()) q.push(make_pair(v[i].size(), i));
    for (int i = 0; i < x; i++) {
      auto p = q.top();
      q.pop(), b[v[p.second].back()] = true, v[p.second].pop_back(),
               q.push(make_pair(p.first - 1, p.second));
    }
    int m = 1;
    for (int i = 2; i <= n + 1; i++)
      if (v[i].size() > v[m].size()) m = i;
    int k[n - x], l[n], c = 0, w = 0;
    for (int i = 1; i <= n + 1; i++)
      for (auto j : v[i]) k[c++] = j;
    for (int i = 0; i < c; i++) l[k[i]] = k[(i + c / 2) % c];
    int d[n];
    for (int i = 0; i < n; i++) d[i] = a[i];
    for (int i = 0; i < n; i++)
      if (!b[i])
        if (d[i] == a[l[i]])
          d[i] = mex;
        else {
          d[i] = a[l[i]];
          w++;
        }
    if (w < y - x)
      cout << "NO\n";
    else {
      for (int i = 0; w > y - x; i++)
        if (!b[i] && d[i] != mex) d[i] = mex, w--;
      cout << "YES\n";
      for (auto i : d) cout << i << " ";
      cout << "\n";
    }
  }
}
