#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--)
    [] {
      int n, x, y;
      cin >> n >> x >> y;
      int z = n - y;
      y -= x;
      int u = n;
      vector<vector<int>> mp(n + 2);
      for (int i = 0; i < n; ++i) {
        int a;
        cin >> a;
        mp[a].push_back(i);
      }
      priority_queue<pair<int, int>> pq;
      int t = 0;
      for (int i = 1; i <= n + 1; ++i) {
        if (mp[i].empty()) t = i;
        pq.push({mp[i].size(), i});
      }
      vector<int> ans(n);
      while (x--) {
        int a = pq.top().second;
        pq.pop();
        auto& v = mp[a];
        ans[v.back()] = a;
        v.pop_back();
        n--;
        pq.push({v.size(), a});
      }
      while (z-- && pq.top().first > n / 2) {
        int a = pq.top().second;
        pq.pop();
        auto& v = mp[a];
        ans[v.back()] = t;
        v.pop_back();
        n--;
        pq.push({v.size(), a});
      }
      int mx = pq.top().first;
      if (mx > n / 2) {
        cout << "NO\n";
        return;
      }
      vector<pair<int, int>> vec;
      for (int i = 1; i <= u + 1; ++i)
        for (int j : mp[i]) {
          vec.push_back({i, j});
        }
      int m = vec.size();
      for (int i = 0; i < m; ++i) {
        ans[vec[i].second] = vec[(i + mx) % m].first;
      }
      for (int i = 0; i < n - y; ++i) {
        ans[vec[i].second] = t;
      }
      cout << "YES\n";
      for (int i : ans) cout << i << ' ';
      cout << '\n';
    }();
}
