#include <bits/stdc++.h>
using namespace std;
const int SIZE = 100 * 1000;
int n, x, y;
int bob[SIZE];
int alice[SIZE];
int number[SIZE + 2];
int pointer[SIZE + 2];
bool isAdded[SIZE + 2];
priority_queue<pair<int, int> > Q;
vector<int> ind[SIZE + 2];
vector<int> color;
void fastIO();
void read();
void addNumber(int);
void addIndices();
void setPointer();
void chooseX();
bool possible();
void makeTheRest();
int getSpecialColor();
void print();
void clearIndices();
void clearAlice();
void clearIsAdded();
void clearQueue();
int main() {
  fastIO();
  int t;
  cin >> t;
  while (t--) {
    read();
    addNumber(+1);
    addIndices();
    setPointer();
    chooseX();
    if (possible()) {
      makeTheRest();
      print();
    } else
      cout << "NO" << endl;
    addNumber(-1);
    setPointer();
    clearIndices();
    clearAlice();
    clearIsAdded();
    clearQueue();
    color.clear();
  }
  return 0;
}
void fastIO() {
  ios_base ::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
}
void read() {
  cin >> n >> x >> y;
  for (int i = 0; i < n; i++) cin >> bob[i];
}
void addNumber(int value) {
  for (int i = 0; i < n; i++) {
    int c = bob[i];
    number[c] += value;
  }
}
void addIndices() {
  for (int i = 0; i < n; i++) {
    int c = bob[i];
    ind[c].push_back(i);
  }
}
void setPointer() {
  for (int i = 0; i < n; i++) {
    int c = bob[i];
    pointer[c] = 0;
  }
}
void chooseX() {
  for (int i = 0; i < n; i++) {
    int col = bob[i];
    if (!isAdded[col]) {
      int num = number[col];
      pair<int, int> elem(num, col);
      Q.push(elem);
      isAdded[col] = true;
    }
  }
  for (int i = 0; i < x; i++) {
    pair<int, int> elem = Q.top();
    int num = elem.first;
    int col = elem.second;
    int p = pointer[col];
    int index = ind[col][p];
    alice[index] = bob[index];
    pointer[col]++;
    Q.pop();
    if (num > 1) {
      pair<int, int> newElem(num - 1, col);
      Q.push(newElem);
    }
  }
}
bool possible() {
  if (x == n) return true;
  pair<int, int> elem = Q.top();
  int num = elem.first;
  int rem = n - x;
  int val = 2 * num - rem;
  if (val <= 0) return true;
  return ((rem - val) >= y - x);
}
void makeTheRest() {
  int maxLen;
  bool first = true;
  while (!Q.empty()) {
    pair<int, int> elem = Q.top();
    int num = elem.first;
    int col = elem.second;
    if (first) {
      maxLen = num;
      first = false;
    }
    for (int i = 0; i < num; i++) color.push_back(col);
    Q.pop();
  }
  int sc = getSpecialColor();
  int dif = y - x;
  for (int i = 0; i < color.size(); i++) {
    int rep = i - maxLen;
    if (rep < 0) rep += color.size();
    if (color[rep] == color[i] || dif == 0) {
      int c = color[i];
      int p = pointer[c];
      int index = ind[c][p];
      alice[index] = sc;
      pointer[c]++;
    } else {
      int c = color[i];
      int p = pointer[c];
      int index = ind[c][p];
      alice[index] = color[rep];
      pointer[c]++;
      dif--;
    }
  }
}
int getSpecialColor() {
  for (int c = 1; c <= n + 1; c++)
    if (number[c] == 0) return c;
  return -1;
}
void print() {
  cout << "YES" << endl;
  for (int i = 0; i < n; i++) {
    if (i > 0) cout << ' ';
    cout << alice[i];
  }
  cout << endl;
}
void clearIndices() {
  for (int i = 0; i < n; i++) {
    int c = bob[i];
    ind[c].clear();
  }
}
void clearAlice() {
  for (int i = 0; i < n; i++) alice[i] = 0;
}
void clearIsAdded() {
  for (int i = 0; i < n; i++) {
    int c = bob[i];
    isAdded[c] = false;
  }
}
void clearQueue() {
  while (!Q.empty()) Q.pop();
}
