#include <bits/stdc++.h>
using namespace std;
template <class c>
struct rge {
  c b, e;
};
template <class c>
rge<c> range(c i, c j) {
  return rge<c>{i, j};
}
template <class c>
auto dud(c *x) -> decltype(cerr << *x, 0);
template <class c>
char dud(...);
struct debug {
  template <class c>
  debug &operator<<(const c &) {
    return *this;
  }
};
struct compare {
  bool operator()(const pair<int, int> &a, const pair<int, int> &b) const {
    if ((a.second - a.first) != (b.second - b.first))
      return ((a.second - a.first) > (b.second - b.first));
    else
      return (a.first < b.first);
  }
};
const int mod = 1e9 + 7, nax = 1e5;
int mpow(int base, int exp);
void add_self(int &a, int b);
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    int n, x, y;
    scanf("%d%d%d", &n, &x, &y);
    vector<int> v(n);
    vector<int> dp(n + 2, 0);
    stack<int> req[n + 2];
    for (int i = 0; i < n; i++) {
      int temp;
      scanf("%d", &temp);
      v[i] = temp;
      dp[temp]++;
      req[temp].push(i);
    }
    if (x == n) {
      printf("YES\n");
      for (int i = 0; i < n; i++) printf("%d ", v[i]);
      puts("");
      continue;
    }
    int other;
    priority_queue<pair<int, int>> q;
    for (int i = 0; i < n + 2; i++) {
      if (dp[i] != 0) {
        q.push({dp[i], i});
      } else
        other = i;
    }
    vector<int> ans(n, other);
    for (int i = 0; i < x; i++) {
      auto p = q.top();
      q.pop();
      int ind = req[p.second].top();
      req[p.second].pop();
      ans[ind] = p.second;
      dp[p.second]--;
      p.first--;
      if (p.first) q.push(p);
    }
    vector<int> freq;
    while (!q.empty()) {
      auto p = q.top();
      q.pop();
      freq.push_back(p.second);
    }
    y -= x;
    n -= x;
    int dec = 2 * dp[freq[0]] - n;
    if ((n - dec - y) < 0)
      printf("NO\n");
    else {
      int low = 0, high = 1;
      for (int i = 0; i < y; i++) {
        if (dp[freq[high]] == 0 && high != freq.size() - 1) high++;
        if (dp[freq[high]] == 0 && high == freq.size() - 1) high = 0;
        if (high == low) low++;
        if (req[freq[low]].size() == 0) low++;
        int index = req[freq[low]].top();
        req[freq[low]].pop();
        dp[freq[high]]--;
        ans[index] = freq[high];
      }
      printf("YES\n");
      for (auto i : ans) printf("%d ", i);
      puts("");
    }
  }
}
int mpow(int base, int exp) {
  base %= mod;
  int result = 1;
  while (exp > 0) {
    if (exp & 1) result = ((long long int)result * base) % mod;
    base = ((long long int)base * base) % mod;
    exp >>= 1;
  }
  return result;
}
void add_self(int &a, int b) {
  a += b;
  if (a >= mod) a -= mod;
}
