#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:10000000000")
#pragma GCC optimize("O3")
using namespace std;
const int MOD = 1000000007;
const int INF = 1000000007LL;
const long long INF2 = 1LL << 62LL;
const long double EPS = 1e-9;
const int SIZE = 200010;
mt19937 rng(time(0));
uniform_int_distribution<int> uid(-1000000000, 1000000000);
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int tt;
  cin >> tt;
  for (int rep_iter = 0; rep_iter < tt; ++rep_iter) {
    int n, x, y, ost;
    cin >> n >> x >> y;
    vector<int> b(n, -1);
    set<int> used_color;
    map<int, vector<int> > pos;
    for (int i2 = 0; i2 < n; ++i2) {
      int a;
      cin >> a;
      used_color.insert(a);
      pos[a].push_back(i2);
    }
    for (int i = 1; i <= n + 1; ++i) {
      if (!(used_color.find(i) != used_color.end())) {
        ost = i;
        break;
      }
    }
    set<pair<int, int> > colors;
    for (auto& i : pos) colors.insert({i.second.size(), i.first});
    for (int rep_iter = 0; rep_iter < x; ++rep_iter) {
      auto p = *(--colors.end());
      colors.erase(--colors.end());
      --p.first;
      int color = p.second;
      int j = pos[color].back();
      pos[color].pop_back();
      b[j] = color;
      if (p.first) colors.insert(p);
    }
    y -= x;
    int m = n - x;
    int real_y;
    if (colors.size())
      real_y = min(m, (m - (--colors.end())->first) * 2);
    else
      real_y = m;
    if (real_y < y) {
      cout << "NO\n";
      continue;
    }
    cout << "YES\n";
    vector<int> v;
    int j = -1;
    for (auto& i : colors) {
      if (i.first) j = v.size();
      for (int rep_iter = 0; rep_iter < i.first; ++rep_iter)
        v.push_back(i.second);
    }
    for (auto& color : v) {
      if (!y) break;
      --y;
      int color_move = v[j];
      j = (j + 1) % v.size();
      while (color_move == color) {
        color_move = v[j];
        j = (j + 1) % v.size();
      }
      int k = pos[color].back();
      pos[color].pop_back();
      b[k] = color_move;
    }
    for (auto& i : b) {
      if (i == -1) i = ost;
    }
    for (auto& i : b) cout << i << ' ';
    cout << '\n';
  }
  return 0;
}
