#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
bool vis[2 * N];
vector<pair<int, int>> A1[N];
vector<int> A2[N];
int cnt[N];
int a[N];
int n, x, y;
void trim(vector<pair<int, int>>& x) {
  while (x.size() && vis[x.back().second]) x.pop_back();
}
void euler(int v) {
  while (1) {
    trim(A1[v]);
    if (!A1[v].size()) break;
    int u = A1[v].back().first;
    vis[A1[v].back().second] = 1;
    A2[u].push_back(v);
    v = u;
  }
}
void clr() {
  for (int i = (0); i < (n + 2); ++i) cnt[i] = 0, A1[i].clear(), A2[i].clear();
  for (int i = (0); i < (2 * n + 4); ++i) vis[i] = 0;
}
void solve() {
  cin >> n >> x >> y;
  y = n - y;
  clr();
  for (int i = (0); i < (n); ++i) {
    cin >> a[i];
    a[i]--;
    cnt[a[i]] += 2;
  }
  int zzz = 0;
  for (int i = (0); i < (n + 1); ++i)
    if (cnt[i] == 0) {
      zzz = i;
      break;
    }
  cnt[zzz] = 2 * y;
  set<pair<int, int>, greater<pair<int, int>>> s;
  for (int i = (0); i < (n + 1); ++i)
    if (i != zzz) s.insert({cnt[i], i});
  for (int _ = (0); _ < (x); ++_) {
    int i = s.begin()->second;
    s.erase(s.begin());
    cnt[i] -= 2;
    s.insert({cnt[i], i});
  }
  s.insert({cnt[zzz], zzz});
  if (s.begin()->first > n - x + y) {
    cout << "NO\n";
    return;
  }
  for (int _ = (0); _ < (n - x + y); ++_) {
    int i = s.begin()->second;
    s.erase(s.begin());
    int j = s.begin()->second;
    s.erase(s.begin());
    cnt[i]--;
    cnt[j]--;
    A1[i].push_back({j, _});
    A1[j].push_back({i, _});
    s.insert({cnt[i], i});
    s.insert({cnt[j], j});
  }
  for (int i = (0); i < (n + 1); ++i) {
    trim(A1[i]);
    if (A1[i].size()) euler(i);
  }
  cout << "YES\n";
  for (int i = (0); i < (n); ++i) {
    if (!A2[a[i]].size())
      cout << a[i] + 1 << ' ';
    else
      cout << A2[a[i]].back() + 1 << ' ', A2[a[i]].pop_back();
  }
  cout << '\n';
}
int main() {
  ios::sync_with_stdio(false), cin.tie(0);
  ;
  int t;
  cin >> t;
  while (t--) solve();
}
