#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int num[N], used[N];
int num_ok;
struct Data {
  int cnt;
  int num;
  bool operator<(const Data &c) const { return cnt < c.cnt; }
};
queue<int> p[N];
priority_queue<Data> q;
int tot;
int ans[N];
int poss[N], numm[N], cntt = 0;
int b[N];
bool ok[N];
bool cmp(Data a, Data b) { return a.num > b.num; }
int main() {
  int T, n, x, y;
  scanf("%d", &T);
  while (T--) {
    scanf("%d %d %d", &n, &x, &y);
    tot = 0;
    for (int i = 1; i <= n + 1; i++) {
      used[i] = 0;
      num[i] = 0;
      while (!p[i].empty()) p[i].pop();
    }
    while (!q.empty()) q.pop();
    for (int i = 1; i <= n; i++) {
      scanf("%d", &b[i]);
      p[b[i]].push(i);
      used[b[i]] = 1;
      num[b[i]]++;
    }
    for (int i = 1; i <= n + 1; i++) {
      ok[i] = 0;
      if (!used[i]) num_ok = i;
      if (num[i] != 0) {
        Data tmp;
        tmp.cnt = num[i], tmp.num = i;
        q.push(tmp);
      }
    }
    for (int i = 1; i <= x; i++) {
      Data tmp = q.top();
      q.pop();
      int id = tmp.num;
      tmp.cnt--;
      if (tmp.cnt != 0) q.push(tmp);
      int pos = p[id].front();
      p[id].pop();
      if (i <= x) {
        ans[pos] = b[pos];
        ok[pos] = 1;
      }
    }
    bool flag = 1;
    cntt = 0;
    if (x != y) {
      int i = 1, j = 1;
      bool flag1 = 1;
      while (!q.empty()) {
        Data tmp = q.top();
        q.pop();
        while (!p[tmp.num].empty()) {
          poss[++cntt] = p[tmp.num].front();
          numm[cntt] = tmp.num;
          p[tmp.num].pop();
        }
        if (flag1 && !q.empty()) j = cntt + 1, flag1 = 0;
      }
      for (; i <= cntt; i++) {
        ans[poss[j]] = numm[i];
        j++;
        if (j > cntt) j = 1;
      }
    }
    int rest = n - y;
    for (int i = 1; i <= n; i++) {
      if (ok[i]) continue;
      if (ans[i] == b[i]) {
        if (rest > 0) {
          rest--;
          ans[i] = num_ok;
        } else
          flag = 0;
      }
    }
    if (flag == 0) {
      printf("NO\n");
      continue;
    }
    for (int i = 1; i <= n; i++) {
      if (ok[i]) continue;
      if (ans[i] != b[i] && ans[i] != num_ok && rest != 0) {
        rest--;
        ans[i] = num_ok;
      }
    }
    if (flag) {
      printf("YES\n");
      for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
      printf("\n");
    } else
      printf("NO\n");
  }
}
