#include <bits/stdc++.h>
using namespace std;
const int N = 100100;
int col[N];
int used[N];
int qtd[N];
int res[N];
int main() {
  int t;
  cin >> t;
  for (int cas = 0; cas < t; ++cas) {
    int n, x, y;
    cin >> n >> x >> y;
    for (int i = 0; i <= n + 1; ++i) {
      used[i] = 0;
      qtd[i] = 0;
      res[i] = 0;
    }
    set<pair<int, int> > st;
    priority_queue<pair<int, int> > pq;
    for (int i = 0; i < n; ++i) {
      cin >> col[i];
      qtd[col[i]]++;
      used[col[i]] = 1;
      st.insert(make_pair(col[i], i));
    }
    int color = 0;
    for (int i = 1; i <= n + 1; ++i) {
      if (used[i] == 0) {
        color = i;
      }
      pq.push(make_pair(qtd[i], i));
    }
    for (int i = 0; i < x; ++i) {
      pair<int, int> top = pq.top();
      pq.pop();
      top.first--;
      pq.push(top);
      pair<int, int> p = *st.lower_bound(make_pair(top.second, -1));
      st.erase(p);
      res[p.second] = p.first;
    }
    int size = pq.top().first;
    if (2 * size - (n - y) > (n - x)) {
      puts("NO");
    } else {
      int st_size = st.size();
      vector<int> st_v;
      for (pair<int, int> x : st) {
        st_v.push_back(x.second);
      }
      for (int i = 0; i < st_size; ++i) {
        int rotate = (i + (st_size) / 2) % st_size;
        res[st_v[rotate]] = col[st_v[i]];
      }
      st.clear();
      for (int i = 0; i < st_size; ++i) {
        st.insert(make_pair(res[st_v[i]], st_v[i]));
      }
      vector<int> pos;
      int rest = n - y;
      for (int i = 0; i < st_size; ++i) {
        if (res[st_v[i]] == col[st_v[i]]) {
          pos.push_back(st_v[i]);
        }
      }
      for (int i = 0; i < rest; ++i) {
        if (!pos.empty()) {
          int at = pos.back();
          pos.pop_back();
          pair<int, int> p = *st.lower_bound(make_pair(res[at], at));
          st.erase(p);
          res[p.second] = color;
        } else {
          pair<int, int> p = *st.lower_bound(make_pair(-1, -1));
          st.erase(p);
          res[p.second] = color;
        }
      }
      puts("YES");
      for (int i = 0; i < n; ++i) {
        printf("%d ", res[i]);
      }
      printf("\n");
    }
  }
}
