#include <bits/stdc++.h>
using namespace std;
const int NMAX = 1e5;
int N, X, Y;
int a[NMAX + 2], b[NMAX + 2];
vector<int> posOfColor[NMAX + 2];
vector<int> colorsOfFreq[NMAX + 2];
int main() {
  int t;
  cin >> t;
  while (t--) {
    cin >> N >> X >> Y;
    for (int i = 0; i <= N + 1; i++) {
      posOfColor[i].clear();
      colorsOfFreq[i].clear();
      b[i] = 0;
    }
    for (int i = 1; i <= N; i++) {
      cin >> a[i];
      posOfColor[a[i]].push_back(i);
    }
    if (X == N) {
      cout << "YES\n";
      for (int i = 1; i <= N; i++) cout << a[i] << ' ';
      cout << '\n';
      continue;
    }
    int garbageValue = -1;
    for (int i = 1; i <= N + 1; i++)
      if (posOfColor[i].empty()) {
        garbageValue = i;
        break;
      }
    for (int i = 1; i <= N + 1; i++)
      colorsOfFreq[(int)posOfColor[i].size()].push_back(i);
    int currentFreq = N;
    for (int i = 1; i <= X; i++) {
      while (colorsOfFreq[currentFreq].empty()) currentFreq--;
      int colorToPlace = colorsOfFreq[currentFreq].back();
      colorsOfFreq[currentFreq].pop_back();
      if (currentFreq > 1) {
        colorsOfFreq[currentFreq - 1].push_back(colorToPlace);
      }
      b[posOfColor[colorToPlace].back()] = colorToPlace;
      posOfColor[colorToPlace].pop_back();
    }
    vector<int> contiguousReindexing;
    for (int i = currentFreq; i >= 1; i--) {
      while (!colorsOfFreq[i].empty()) {
        int color = colorsOfFreq[i].back();
        colorsOfFreq[i].pop_back();
        for (auto it : posOfColor[color]) contiguousReindexing.push_back(it);
      }
    }
    assert((int)contiguousReindexing.size() == N - X);
    vector<int> shiftedReindexing(N - X);
    for (int i = 0; i < N - X; i++)
      shiftedReindexing[(i + (N - X) / 2) % (N - X)] = contiguousReindexing[i];
    for (int i = 0; i < N - X; i++)
      b[shiftedReindexing[i]] = a[contiguousReindexing[i]];
    int matches = 0;
    for (int i = 1; i <= N; i++)
      if (a[i] == b[i]) matches++;
    if (X + N - Y < matches) {
      cout << "NO\n";
      continue;
    } else {
      int excessMatches = matches - X, garbageSpots = N - Y;
      for (int i = 1; i <= N; i++)
        if (a[i] == b[i] && excessMatches) {
          b[i] = garbageValue;
          excessMatches--;
          garbageSpots--;
        }
      for (int i = 1; i <= N; i++)
        if (b[i] != garbageValue && a[i] != b[i] && garbageSpots) {
          b[i] = garbageValue;
          garbageSpots--;
        }
      cout << "YES\n";
      for (int i = 1; i <= N; i++) cout << b[i] << ' ';
      cout << '\n';
    }
  }
  return 0;
}
