#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ii = pair<int, int>;
int b[100001];
bitset<100001> used;
vector<int> c[100001];
int main() {
  if (fopen("in", "r")) freopen("in", "r", stdin), freopen("out", "w", stdout);
  ios_base::sync_with_stdio(0), cin.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int n, x, y;
    cin >> n >> x >> y;
    for (int i = 0; i <= n + 1; ++i) used[i] = 0, c[i].clear();
    for (int i = 0; i < n; ++i) {
      cin >> b[i];
      c[b[i]].push_back(i);
    }
    int u;
    for (int i = 1; i <= n + 1; ++i)
      if (c[i].empty()) {
        u = i;
        break;
      }
    priority_queue<ii> pq;
    for (int i = 1; i <= n + 1; ++i) pq.emplace(c[i].size(), i);
    for (int i = 0; i < x; ++i) {
      used[c[pq.top().second][pq.top().first - 1]] = 1;
      ii tmp = pq.top();
      pq.pop();
      pq.emplace(tmp.first - 1, tmp.second);
    }
    int first = pq.top().first;
    if (max(2 * first - n + x, 0) > n - y) {
      cout << "NO\n";
      continue;
    }
    vector<int> v, p;
    for (int i = 1; i <= n + 1; ++i) {
      for (int j : c[i])
        if (!used[j]) v.push_back(i), p.push_back(j);
    }
    rotate(begin(v), begin(v) + (n - x) / 2, end(v));
    vector<int> col(n);
    for (int i = 0; i < v.size(); ++i) col[p[i]] = v[i];
    int cnt = 0;
    vector<int> ans;
    for (int i = 0, j = 0; i < n; ++i) {
      if (used[i])
        ans.push_back(b[i]);
      else {
        if (col[i] == b[i])
          ans.push_back(u);
        else if (cnt < n - y - max(2 * first - n + x, 0)) {
          ans.push_back(u);
          ++cnt;
        } else {
          ans.push_back(col[i]);
        }
        ++j;
      }
    }
    cout << "YES\n";
    for (int x : ans) cout << x << ' ';
    cout << '\n';
  }
}
