#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9;
const long long N = 1e5 + 10;
vector<long long> pos[N];
long long ans[N];
long long a[N];
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long t;
  cin >> t;
  while (t--) {
    long long n, x, y;
    cin >> n >> x >> y;
    map<long long, long long> mp;
    for (long long i = 1; i <= n; i++) {
      cin >> a[i];
      pos[a[i]].push_back(i);
      mp[a[i]]++;
    }
    priority_queue<pair<long long, long long> > pq;
    long long random_put;
    for (long long i = 1; i <= n + 1; i++) {
      if (mp[i] > 0) {
        pq.push({mp[i], i});
      } else
        random_put = i;
    }
    y -= x;
    while (x > 0) {
      pair<long long, long long> xx = pq.top();
      pq.pop();
      ans[pos[xx.second].back()] = xx.second;
      pos[xx.second].pop_back();
      xx.first--;
      if (xx.first > 0) pq.push({xx.first, xx.second});
      x--;
    }
    if (y % 2 == 0) {
      long long flag = 0;
      while (y > 0) {
        if (pq.size() == 1) {
          flag = 1;
          break;
        }
        pair<long long, long long> xx = pq.top();
        pq.pop();
        pair<long long, long long> yy = pq.top();
        pq.pop();
        ans[pos[xx.second].back()] = yy.second;
        ans[pos[yy.second].back()] = xx.second;
        pos[xx.second].pop_back();
        pos[yy.second].pop_back();
        xx.first--;
        yy.first--;
        if (xx.first > 0) {
          pq.push(xx);
        }
        if (yy.first > 0) {
          pq.push(yy);
        }
        y -= 2;
      }
      if (flag) {
        cout << "NO"
             << "\n";
      } else {
        cout << "YES"
             << "\n";
        for (long long i = 1; i <= n; i++) {
          if (ans[i] == 0)
            cout << random_put << " ";
          else
            cout << ans[i] << " ";
        }
        cout << "\n";
      }
    } else {
      long long flag = 0;
      while (y > 3) {
        if (pq.size() == 1) {
          flag = 1;
          break;
        }
        pair<long long, long long> xx = pq.top();
        pq.pop();
        pair<long long, long long> yy = pq.top();
        pq.pop();
        ans[pos[xx.second].back()] = yy.second;
        ans[pos[yy.second].back()] = xx.second;
        pos[xx.second].pop_back();
        pos[yy.second].pop_back();
        xx.first--;
        yy.first--;
        if (xx.first > 0) {
          pq.push(xx);
        }
        if (yy.first > 0) {
          pq.push(yy);
        }
        y -= 2;
      }
      if (flag) {
        cout << "NO"
             << "\n";
      } else {
        if (y == 1) {
          if (pq.size() == 1) {
            cout << "NO"
                 << "\n";
          } else {
            pair<long long, long long> xx = pq.top();
            pq.pop();
            pair<long long, long long> yy = pq.top();
            pq.pop();
            ans[pos[xx.second].back()] = yy.second;
            cout << "YES"
                 << "\n";
            for (long long i = 1; i <= n; i++) {
              if (ans[i] == 0)
                cout << random_put << " ";
              else
                cout << ans[i] << " ";
            }
            cout << "\n";
          }
        } else {
          if (pq.size() == 1) {
            cout << "NO"
                 << "\n";
          } else if (pq.size() == 2) {
            pair<long long, long long> xx = pq.top();
            pq.pop();
            pair<long long, long long> yy = pq.top();
            pq.pop();
            ans[pos[xx.second].back()] = yy.second;
            ans[pos[yy.second].back()] = xx.second;
            pos[xx.second].pop_back();
            pos[yy.second].pop_back();
            xx.first--;
            yy.first--;
            if (xx.first > 0) {
              pq.push(xx);
            }
            if (yy.first > 0) {
              pq.push(yy);
            }
            y -= 2;
            if (pq.size() == 1) {
              cout << "NO"
                   << "\n";
            } else {
              pair<long long, long long> xx = pq.top();
              pq.pop();
              pair<long long, long long> yy = pq.top();
              pq.pop();
              ans[pos[xx.second].back()] = yy.second;
              cout << "YES"
                   << "\n";
              for (long long i = 1; i <= n; i++) {
                if (ans[i] == 0)
                  cout << random_put << " ";
                else
                  cout << ans[i] << " ";
              }
              cout << "\n";
            }
          } else {
            long long xx = pq.top().second;
            pq.pop();
            long long yy = pq.top().second;
            pq.pop();
            long long zz = pq.top().second;
            pq.pop();
            ans[pos[xx].back()] = zz;
            ans[pos[yy].back()] = xx;
            ans[pos[zz].back()] = yy;
            cout << "YES"
                 << "\n";
            for (long long i = 1; i <= n; i++) {
              if (ans[i] == 0)
                cout << random_put << " ";
              else
                cout << ans[i] << " ";
            }
            cout << "\n";
          }
        }
      }
    }
    for (long long i = 1; i <= n + 1; i++) {
      ans[i] = 0;
      pos[i].clear();
    }
  }
}
