#include <bits/stdc++.h>
using namespace std;
const int maxn = 200005;
const int maxm = 100;
const int inf = 2147483647;
const double eps = 1e-9;
const long long INF = 9223372036854775807ll;
long long qpow(long long a, long long b, long long c) {
  long long ans = 1;
  while (b) {
    if (b & 1) ans = ans * a % c;
    a = a * a % c;
    b >>= 1;
  }
  return ans;
}
int cnt[maxn], res[maxn], vis[maxn], a[maxn];
vector<int> lis[maxn];
struct Node {
  int ct, v;
  bool operator<(const Node a) const { return ct < a.ct; }
};
bool cmp(int a, int b) { return lis[a].size() > lis[b].size(); }
priority_queue<Node> q;
vector<int> g;
vector<Node> gg;
int main() {
  int t, ka;
  scanf("%d", &t);
  ka = t;
  while (t--) {
    int n, x, y;
    scanf("%d%d%d", &n, &x, &y);
    memset(res, 0, sizeof(int) * (n + 2));
    for (register int i = (0); i < (n); ++i) {
      scanf("%d", &a[i]);
      cnt[a[i]]++;
      lis[a[i]].push_back(i);
      vis[a[i]] = 1;
    }
    int f;
    if (!vis[n + 1]) f = n + 1;
    vis[n + 1] = 0;
    for (register int i = (0); i < (n); ++i) {
      if (!vis[i + 1]) f = i + 1;
      vis[i + 1] = 0;
      if (cnt[a[i]]) q.push(Node{cnt[a[i]], a[i]});
      cnt[a[i]] = 0;
    }
    for (register int i = (0); i < (x); ++i) {
      Node u = q.top();
      q.pop();
      res[lis[u.v].back()] = u.v;
      lis[u.v].pop_back();
      u.ct--;
      if (u.ct) q.push(u);
    }
    while (!q.empty()) {
      g.push_back(q.top().v);
      q.pop();
    }
    sort(g.begin(), g.end(), cmp);
    for (register int i = (0); i < (g.size()); ++i) {
      while (!lis[g[i]].empty()) {
        gg.push_back(Node{lis[g[i]].back(), g[i]});
        lis[g[i]].pop_back();
      }
    }
    int sz = (int)gg.size();
    int rs = n - y;
    bool failed = false;
    for (register int i = (0); i < (gg.size()); ++i) {
      res[gg[(i + (n - x) / 2) % (n - x)].ct] = gg[i].v;
      if (gg[i].v == gg[(i + (n - x) / 2) % (n - x)].v) {
        if (!rs) {
          failed = true;
          break;
        } else {
          res[gg[(i + (n - x) / 2) % (n - x)].ct] = f;
          rs--;
        }
      }
    }
    int cur = 0;
    while (rs && !failed) {
      if (res[gg[cur].ct] != f) {
        res[gg[cur].ct] = f;
        rs--;
      }
      cur++;
    }
    if (failed)
      printf("NO\n");
    else {
      printf("YES\n");
      for (register int i = (0); i < (n); ++i) printf("%d ", res[i]);
      printf("\n");
    }
    g.clear(), gg.clear();
  }
}
