#include <bits/stdc++.h>
using namespace std;
const long double PI = atan(1.0) * 4;
const int64_t INF = 3e18;
const int32_t LOG = 21;
const int32_t MOD = 1e9 + 7;
vector<long long int> v[100005];
vector<long long int> vals[100005];
long long int b[100005];
long long int ans[100005];
bool check[100005];
void reset(long long int n) {
  fill(check, check + n + 2, false);
  fill(ans, ans + n + 2, 0LL);
  for (long long int i = 1; i < n + 2; i++) {
    v[i].clear();
    vals[i].clear();
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  long long int tests = 1;
  cin >> tests;
  for (long long int ii = 0; ii < tests; ii++) {
    long long int n, x, y;
    cin >> n >> x >> y;
    for (long long int i = 1; i < n + 1; i++) {
      cin >> b[i];
      check[b[i]] = true;
      vals[b[i]].push_back(i);
    }
    set<pair<long long int, long long int>,
        greater<pair<long long int, long long int>>>
        second;
    for (long long int i = 1; i < n + 2; i++) {
      long long int siz = vals[i].size();
      if (siz == 0) continue;
      second.insert({siz, i});
    }
    long long int tot = 0;
    while (tot < x) {
      pair<long long int, long long int> p = *second.begin();
      second.erase(second.begin());
      p.first--;
      tot++;
      long long int ind = vals[p.second].back();
      ans[ind] = p.second;
      vals[p.second].pop_back();
      if (p.first > 0) second.insert(p);
    }
    long long int unused = -1;
    long long int len = 0;
    for (long long int i = 1; i < n + 2; i++)
      if (!check[i]) unused = i;
    for (long long int i = 1; i < n + 2; i++) {
      len = max(len, (long long int)vals[i].size());
    }
    long long int ptr = 1;
    for (long long int i = 1; i < n + 2; i++) {
      for (long long int j = 0; j < vals[i].size(); j++) {
        long long int ind = vals[i][j];
        v[ptr].push_back(ind);
        ptr++;
        if (ptr > len) ptr = 1;
      }
    }
    long long int cnt = x;
    for (long long int i = 1; i < len + 1; i++) {
      if (cnt == y) break;
      long long int siz = v[i].size();
      if (siz == 1) break;
      long long int cur = siz - 1;
      for (long long int j = 0; j < siz; j++) {
        ans[v[i][j]] = b[v[i][cur]];
        cur++;
        cnt++;
        if (cur == siz) cur = 0;
        if (cnt == y) break;
      }
    }
    for (long long int i = 1; i < n + 1; i++)
      if (ans[i] == 0) ans[i] = unused;
    if (cnt != y)
      cout << "NO" << '\n';
    else {
      cout << "YES" << '\n';
      for (long long int i = 1; i < n + 1; i++) cout << ans[i] << " ";
      cout << '\n';
    }
    reset(n);
  }
  return 0;
}
