#include <bits/stdc++.h>
using namespace std;
int a[100010], b[100010], fz[100010];
vector<int> cl[100010];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int n, x, y, d, r;
    cin >> n >> x >> y;
    bool possible;
    for (int i = 1; i <= n + 1; i++) {
      fz[i] = 0;
      cl[i].clear();
    }
    d = y - x;
    for (int i = 1; i <= n; i++) {
      cin >> b[i];
      cl[b[i]].push_back(i);
      fz[b[i]]++;
      a[i] = 0;
    }
    for (int i = 1; i <= n + 1; i++) {
      if (fz[i] == 0) {
        r = i;
        break;
      }
    }
    priority_queue<pair<int, int>, vector<pair<int, int> > > Q;
    for (int i = 1; i <= n + 1; i++) {
      if (fz[i] > 0) {
        Q.push(pair<int, int>(fz[i], i));
      }
    }
    for (int i = 1; i <= n - d; i++) {
      pair<int, int> p = Q.top();
      Q.pop();
      int f = p.first, c = p.second;
      if (f > 1) {
        Q.push(pair<int, int>(f - 1, c));
      }
    }
    int fmax;
    vector<int> rot;
    if (((int)(Q.size())) > 0) {
      pair<int, int> p = Q.top();
      Q.pop();
      fmax = p.first;
      rot.push_back(p.second);
    } else {
      fmax = 0;
    }
    possible = fmax * 2 <= (n - x);
    if (fmax * 2 <= (n - x)) {
      while ((((int)(Q.size())) > 0) or
             (((int)(rot.size())) > 1 and fmax > 0)) {
        while (((int)(Q.size())) > 0) {
          pair<int, int> p = Q.top();
          if (p.first == fmax) {
            rot.push_back(p.second);
            Q.pop();
          } else {
            break;
          }
        }
        if (((int)(rot.size())) == 1) {
          pair<int, int> p = Q.top();
          Q.pop();
          int c1 = p.second, c2 = rot.back();
          int i1 = cl[c1].back(), i2 = cl[c2].back();
          a[i2] = c1;
          a[i1] = c2;
          cl[c1].pop_back();
          cl[c2].pop_back();
          if (p.first > 1) {
            Q.push(pair<int, int>(p.first - 1, c1));
          }
          d -= 2;
        } else {
          vector<int> il;
          for (int c : rot) {
            il.push_back(cl[c].back());
            cl[c].pop_back();
          }
          int k = ((int)(rot.size()));
          for (int i = 0; i < k; i++) {
            int z = (i + 1) % k;
            a[il[i]] = b[il[z]];
          }
          d -= ((int)(rot.size()));
        }
        fmax--;
      }
      if (d == 1) {
        int c = rot.back(), cu = cl[c].back(), un = 0;
        a[cu] = r;
        for (int i = 1; i <= n; i++) {
          if (a[i] == 0 && b[i] != c) {
            un = i;
            d--;
            break;
          }
        }
        a[un] = c;
      }
      if (d > 0) {
        possible = false;
      }
      for (int i = 1; i <= n; i++) {
        if (a[i] == 0 && x > 0) {
          a[i] = b[i];
          x--;
        }
      }
      for (int i = 1; i <= n; i++) {
        if (a[i] == 0) {
          a[i] = r;
        }
      }
    }
    if (possible) {
      cout << "yes" << endl;
      for (int i = 1; i <= n; i++) {
        cout << a[i] << " ";
      }
      cout << endl;
    } else {
      cout << "no" << endl;
    }
  }
  return 0;
}
