#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int t, n, x, y;
int ans[N], b[N];
vector<int> a[N];
int main() {
  cin >> t;
  while (t--) {
    memset(ans, 0, sizeof(ans));
    cin >> n >> x >> y;
    y = n - y;
    for (int i = 1; i <= n + 1; i++) a[i].clear();
    for (int i = 1; i <= n; i++) {
      cin >> b[i];
      a[b[i]].push_back(i);
    }
    priority_queue<pair<int, int> > q;
    int v = -1;
    for (int i = 1; i <= n + 1; i++) {
      if (a[i].size())
        q.push(make_pair(a[i].size(), i));
      else
        v = i;
    }
    for (int i = 1; i <= x; i++) {
      pair<int, int> u = q.top();
      q.pop();
      int a1 = u.first, b1 = u.second;
      a[b1].pop_back();
      if (a1 - 1 != 0) q.push(make_pair(a1 - 1, b1));
    }
    vector<pair<int, int> > in;
    while (!q.empty()) {
      pair<int, int> u = q.top();
      q.pop();
      int c = u.second;
      for (int i = 0; i < a[c].size(); i++) in.push_back(make_pair(c, a[c][i]));
    }
    int l = (n - x) / 2;
    for (int i = 0; i < in.size(); i++) {
      ans[in[(i + l) % in.size()].second] = in[i].first;
    }
    int cnt = 0;
    for (int i = 1; i <= n; i++) {
      if (ans[i] == b[i]) cnt++, ans[i] = v;
    }
    if (y < cnt) {
      cout << "NO" << endl;
    } else {
      for (int i = 1; i <= n; i++) {
        if (cnt == y) break;
        if (ans[i] != v && ans[i]) {
          ans[i] = v;
          cnt++;
        }
      }
      cout << "YES" << endl;
      for (int i = 1; i <= n; i++) {
        if (!ans[i])
          cout << b[i] << ' ';
        else
          cout << ans[i] << ' ';
      }
      cout << endl;
    }
  }
  return 0;
}
