#include <bits/stdc++.h>
using namespace std;
void debug_out() { cerr << endl; }
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cerr << " " << to_string(H);
  debug_out(T...);
}
long long modPow(long long a, long long b) {
  long long res = 1;
  a %= 998244353;
  assert(b >= 0);
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % 998244353;
    a = a * a % 998244353;
  }
  return res;
}
long long gcd(long long a, long long b) {
  long long r;
  while (b) {
    r = a % b;
    a = b;
    b = r;
  }
  return a;
}
void solve() {
  int n, x, y;
  cin >> n >> x >> y;
  int b[n];
  vector<int> mp[n + 2];
  for (int i = 0; i < n; i++) {
    cin >> b[i];
    mp[b[i]].push_back(i);
  }
  int a[n];
  int not_present = 1;
  while (!mp[not_present].empty()) not_present++;
  for (int i = 0; i < n; i++) a[i] = not_present;
  set<pair<int, int>> b_set;
  for (int i = 1; i < n + 2; i++) b_set.insert(make_pair(mp[i].size(), i));
  y -= x;
  for (int i = 0; i < x; i++) {
    int id = b_set.rbegin()->second;
    b_set.erase(make_pair(mp[id].size(), id));
    a[mp[id].back()] = id;
    42;
    mp[id].pop_back();
    b_set.insert(make_pair(mp[id].size(), id));
  }
  int mx_cl = b_set.rbegin()->second;
  int mx_sz = b_set.rbegin()->first;
  vector<pair<int, int>> vec;
  for (auto x : mp[mx_cl]) vec.push_back(make_pair(mx_cl, x));
  for (int i = 1; i < n + 2; i++) {
    if (i == mx_cl) continue;
    for (auto x : mp[i]) vec.push_back(make_pair(i, x));
  }
  for (int i = 0; i < vec.size() && y > 0; i++) {
    int id = (i + mx_sz) % vec.size();
    if (b[vec[id].second] != vec[i].first) {
      a[vec[id].second] = vec[i].first;
      y--;
    }
  }
  42;
  if (y > 0) {
    cout << "NO" << endl;
    return;
  }
  cout << "YES" << endl;
  for (int i = 0; i < n; i++) cout << a[i] << " ";
  cout << endl;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  cout << fixed << setprecision(8);
  int test_cases = 1;
  cin >> test_cases;
  while (test_cases--) {
    solve();
  }
  return 0;
}
