#include <bits/stdc++.h>
using namespace std;
template <typename T>
ostream& operator<<(ostream& os, const vector<T>& v) {
  os << "[";
  string sep;
  for (const T& i : v) os << sep << i, sep = " ";
  os << "]";
  return os;
}
template <typename A, typename B>
ostream& operator<<(ostream& os, const pair<A, B>& p) {
  os << "(" << p.first << ", " << p.second << ")";
  return os;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int test;
  cin >> test;
  while (test--) {
    int n, x, y;
    cin >> n >> x >> y;
    int b[n];
    map<int, vector<int>> m;
    for (int i = 0; i < n; i++) {
      cin >> b[i];
      m[b[i]].push_back(i);
    }
    int unused = 1;
    for (auto& i : m) {
      if (unused != i.first) break;
      unused++;
    }
    map<int, vector<int>> freq;
    int mx = 0;
    for (auto& i : m) {
      mx = max(mx, (int)i.second.size());
      freq[i.second.size()].push_back(i.first);
    }
    int ans[n];
    int count = x;
    while (mx && count) {
      int color = freq[mx].back();
      freq[mx].pop_back();
      if (mx - 1) freq[mx - 1].push_back(color);
      if (freq[mx].empty()) {
        freq.erase(mx);
        mx--;
      }
      int idx = m[color].back();
      m[color].pop_back();
      ans[idx] = b[idx];
      count--;
    }
    vector<int> order;
    for (auto& i : freq) {
      for (auto& j : i.second) {
        order.insert(order.end(), m[j].begin(), m[j].end());
      }
    }
    int mismatch = n - y;
    bool ok = true;
    for (int i = 0; i < n - x; i++) {
      int idx = (i + (n - x) / 2) % (n - x);
      ans[order[i]] = b[order[idx]];
      if (ans[order[i]] == b[order[i]]) {
        if (!mismatch) {
          ok = false;
          break;
        }
        mismatch--;
        ans[order[i]] = unused;
      }
    }
    if (!ok) {
      cout << "NO" << '\n';
      continue;
    }
    for (int i = 0; i < n - x && mismatch; i++) {
      if (ans[order[i]] != unused) {
        ans[order[i]] = unused;
        mismatch--;
      }
    }
    cout << "YES" << '\n';
    for (int i = 0; i < n; i++) cout << ans[i] << ' ';
    cout << '\n';
  }
  return 0;
}
