#include <bits/stdc++.h>
using namespace std;
template <typename T, typename U>
bool ckmin(T &a, U b) {
  return b < a ? a = b, true : false;
}
template <typename T, typename U>
bool ckmax(T &a, U b) {
  return b > a ? a = b, true : false;
}
int tt;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> tt;
  while (tt--) {
    int n, x, y, un = -1;
    cin >> n >> x >> y;
    set<int> second;
    vector<int> v(n, 0), res(n, -1);
    map<int, vector<int>> m;
    vector<pair<int, vector<int>>> a, b;
    for (int i = 0; i < n; ++i) {
      cin >> v[i];
      v[i]--;
      m[v[i]].push_back(i);
    }
    for (int i = 0; i <= n; ++i) second.insert(i);
    for (auto i : v) {
      if (second.find(i) != second.end()) second.erase(i);
    }
    un = (*second.begin());
    for (auto i : m) a.push_back(i);
    sort(a.begin(), a.end(),
         [](const pair<int, vector<int>> &a, const pair<int, vector<int>> &b) {
           return (int)(a.second).size() < (int)(b.second).size();
         });
    int cnt = 0, pp = 0;
    map<int, vector<int>> tmp;
    while (cnt < n - x) {
      if ((int)(a[pp].second).size()) {
        tmp[a[pp].first].push_back(a[pp].second.back());
        a[pp].second.pop_back();
        cnt++;
      }
      pp++;
      if (pp >= (int)(a).size()) pp -= (int)(a).size();
    }
    for (auto i : tmp) {
      b.push_back(i);
    }
    for (auto i : a) {
      for (auto j : i.second) {
        res[j] = i.first;
      }
    }
    vector<pair<int, int>> xx, yy;
    for (auto i : b) {
      for (auto j : i.second) {
        xx.push_back(make_pair(i.first, j));
        yy.push_back(make_pair(i.first, j));
      }
    }
    rotate(yy.begin(), yy.begin() + ((int)(yy).size() / 2), yy.end());
    vector<int> store;
    for (int i = 0; i < (int)(yy).size(); ++i) {
      if (xx[i].first == yy[i].first) store.push_back(i);
    }
    if ((int)(store).size() > n - y) {
      cout << "NO\n";
      continue;
    }
    for (auto i : store) {
      xx[i].first = un;
      res[yy[i].second] = un;
    }
    int rem = n - y - (int)(store).size();
    for (int i = 0; i < (int)(yy).size(); ++i) {
      if (rem && xx[i].first != un) {
        rem--;
        xx[i].first = un;
        res[yy[i].second] = un;
      } else {
        res[yy[i].second] = xx[i].first;
      }
    }
    cout << "YES\n";
    for (auto i : res) cout << i + 1 << " ";
    cout << "\n";
  }
  return 0;
}
