#include <bits/stdc++.h>
using namespace std;
int T, n, x, y, cnt, a[100005], ans[100005], vis[100005];
vector<int> col[100005], v[100005], s;
int main() {
  scanf("%d", &T);
  while (T--) {
    scanf("%d%d%d", &n, &x, &y), cnt = n, s.clear();
    for (int i = 0; i <= n + 1; i++)
      col[i].clear(), v[i].clear(), ans[i] = vis[i] = 0;
    for (int i = 1; i <= n; i++) scanf("%d", &a[i]), col[a[i]].push_back(i);
    for (int i = 1; i <= n + 1; i++) v[col[i].size()].push_back(i);
    for (int i = 1; i <= x; i++) {
      while (!v[cnt].size()) cnt--;
      int pro = v[cnt].back();
      ans[col[pro].back()] = pro, col[pro].pop_back();
      v[cnt].pop_back(), v[cnt - 1].push_back(pro);
    }
    while (!v[cnt].size()) cnt--;
    if (cnt * 2 - (n - x) > n - y) {
      puts("NO");
      continue;
    }
    for (int i = 1; i <= cnt; i++)
      for (int j = 0; j < v[i].size(); j++)
        s.insert(s.end(), col[v[i][j]].begin(), col[v[i][j]].end());
    int pro = n - y;
    for (int i = 0; i < n - x; i++) {
      ans[s[i]] = a[s[(i + (n - x) / 2) % (n - x)]];
      if (ans[s[i]] == a[s[i]]) ans[s[i]] = v[0][0], pro--, vis[s[i]] = 1;
    }
    for (int i = 0; pro; i++)
      if (!vis[s[i]]) ans[s[i]] = v[0][0], pro--, vis[s[i]] = 1;
    printf("YES\n");
    for (int i = 1; i <= n; i++)
      printf("%d", ans[i]), printf(i == n ? "\n" : " ");
  }
}
