#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
const int inf = 0x3f3f3f3f;
const int mod = 1e9 + 7;
vector<int> pos[maxn];
pair<int, int> a[maxn], b[maxn];
int tp[maxn], num[maxn], vis[maxn], ans[maxn];
int n, x, y;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) {
    cin >> n >> x >> y;
    for (int i = 1; i <= n; ++i) {
      cin >> a[i].first;
      a[i].second = i;
      tp[i] = a[i].first;
      ++num[a[i].first];
    }
    sort(a + 1, a + 1 + n);
    set<int> st;
    for (int i = 1; i <= n; ++i) {
      pos[a[i].first].push_back(i);
      st.insert(a[i].first);
    }
    priority_queue<pair<int, int> > q;
    for (auto &v : st) {
      q.push({num[v], v});
    }
    int ret = 1;
    for (int i = 1; i <= x; ++i) {
      pair<int, int> tmp = q.top();
      q.pop();
      int u = tmp.second;
      --num[u];
      vis[pos[u].back()] = 1;
      pos[u].pop_back();
      if (num[u] > 0) q.push({num[u], u});
    }
    int mxv = 0;
    for (auto &v : st) {
      mxv = max(mxv, num[v]);
    }
    int dt = max(0, 2 * mxv - (n - x));
    if (n - x - dt < y - x) ret = 0;
    if (!ret) {
      cout << "NO\n";
    } else {
      int m = 0;
      for (int i = 1; i <= n; ++i) {
        if (vis[i])
          ans[a[i].second] = a[i].first;
        else
          b[++m] = a[i];
      }
      int oth = 0;
      for (int i = 1; i <= n + 1; ++i) {
        if (!st.count(i)) {
          oth = i;
          break;
        }
      }
      sort(b + 1, b + 1 + m);
      int st = 0, res = m;
      for (int i = 1; i <= m; ++i) {
        if (num[b[i].first] == mxv) st = i;
      }
      st = st % m + 1;
      for (int i = 1; i <= y - x; ++i) {
        ans[b[st].second] = b[(st - 1 + mxv) % m + 1].first;
        st = st % m + 1;
      }
      for (int i = y - x + 1; i <= m; ++i) {
        ans[b[st].second] = oth;
        st = st % m + 1;
      }
      cout << "YES\n";
      for (int i = 1; i <= n; ++i) {
        cout << ans[i] << " ";
      }
      cout << "\n";
    }
    for (int i = 1; i <= n; ++i) {
      pos[tp[i]].clear();
    }
    for (int i = 1; i <= n + 1; ++i) {
      vis[i] = num[i] = 0;
    }
  }
  return 0;
}
