#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
int b[N], t[N], c[N], a[N];
vector<int> h, v[N];
set<pair<int, int>> st;
int main() {
  int T;
  scanf("%d", &T);
  while (T--) {
    int n, x, y;
    scanf("%d%d%d", &n, &x, &y);
    for (int i = 1; i <= n; i++) {
      scanf("%d", &b[i]);
      c[b[i]]++;
      t[i] = b[i];
    }
    int sp = 0;
    for (int i = 1; i <= n + 1; i++) {
      if (!c[i]) {
        sp = i;
        break;
      }
    }
    sort(t + 1, t + n + 1);
    int cnt = 0;
    for (int i = 1; i <= n; i++) {
      cnt++;
      if (i == n || t[i] != t[i + 1]) {
        st.insert({cnt, t[i]});
        cnt = 0;
      }
    }
    y -= x;
    while (x--) {
      auto it = --st.end();
      auto p = *it;
      st.erase(it);
      c[p.second]--;
      p.first--;
      v[p.second].push_back(p.second);
      if (p.first) st.insert(p);
    }
    int mx = 0;
    for (auto p : st) {
      mx = max(mx, p.first);
      for (int i = 1; i <= p.first; i++) {
        h.push_back(p.second);
      }
    }
    int sz = h.size();
    for (int i = 0; i < sz && y; i++) {
      if (h[i] != h[(i + mx) % sz]) {
        v[h[i]].push_back(h[(i + mx) % sz]);
        y--;
      }
    }
    if (y)
      printf("NO\n");
    else {
      printf("YES\n");
      for (int i = 1; i <= n; i++) {
        if (v[b[i]].size()) {
          a[i] = v[b[i]].back();
          v[b[i]].pop_back();
        } else
          a[i] = sp;
        printf("%d ", a[i]);
      }
      printf("\n");
    }
    h.clear();
    for (int i = 1; i <= n + 1; i++) {
      c[i] = 0;
      v[i].clear();
    }
    st.clear();
  }
  return 0;
}
