#include <bits/stdc++.h>
using namespace std;
const int MAXV = 100005;
int b[MAXV];
bool compare(int x, int y) { return b[x] > b[y]; }
void solve() {
  int n, x, y, color;
  int a[MAXV], cnt[MAXV], cntcorrect[MAXV];
  vector<int> cycle;
  priority_queue<pair<int, int>> pq;
  cin >> n >> x >> y;
  cycle.clear();
  for (int i = 0; i < MAXV; i++) {
    cnt[i] = 0;
    a[i] = 0;
    cntcorrect[i] = 0;
  }
  for (int i = 0; i < n; i++) {
    cin >> b[i];
    cnt[b[i]]++;
  }
  for (int i = 1; i <= n + 1; i++) {
    if (cnt[i] == 0) {
      color = i;
    } else {
      pq.push({cnt[i], i});
    }
  }
  for (int i = 0; i < x; i++) {
    pair<int, int> tmp = pq.top();
    pq.pop();
    cntcorrect[tmp.second]++;
    tmp.first--;
    if (tmp.first) {
      pq.push(tmp);
    }
  }
  for (int i = 0; i < n; i++) {
    if (cntcorrect[b[i]]) {
      a[i] = b[i];
      cntcorrect[b[i]]--;
    } else {
      cycle.push_back(i);
    }
  }
  sort(cycle.begin(), cycle.end(), compare);
  for (int i = 0; i < cycle.size(); i++) {
    int index = cycle[i];
    int newindex = cycle[(i + cycle.size() / 2) % cycle.size()];
    a[index] = b[newindex];
  }
  int correct = x;
  int wrong = n - y;
  for (int i = 0; i < n; i++) {
    if (a[i] == b[i] && correct) {
      correct--;
    } else if (a[i] == b[i]) {
      a[i] = color;
      wrong--;
    }
  }
  for (int i = 0; i < n; i++) {
    if (wrong > 0 && a[i] != b[i] && a[i] != color) {
      a[i] = color;
      wrong--;
    }
  }
  if (!wrong && !correct) {
    cout << "YES\n";
    for (int i = 0; i < n; i++) {
      cout << a[i] << ' ';
    }
    cout << "\n";
  } else {
    cout << "NO\n";
  }
}
int main() {
  int t;
  cin >> t;
  for (int i = 0; i < t; i++) {
    solve();
  }
  return 0;
}
