#include <bits/stdc++.h>
long long n, i, j, h, k, t, d, m, a, b, c;
using namespace std;
char s;
string ss;
int main() {
  cin >> t;
  for (h = 1; h <= t; h++) {
    cin >> n;
    ss = ".";
    while (n > ss.length()) ss = ss + '.';
    cin >> a >> b >> c;
    d = 0;
    for (i = 0; i < n; i++) {
      cin >> s;
      if (s == 'R' && b > 0) {
        b--;
        d++;
        ss[i] = 'P';
      }
      if (s == 'P' && c > 0) {
        c--;
        d++;
        ss[i] = 'S';
      }
      if (s == 'S' && a > 0) {
        a--;
        d++;
        ss[i] = 'R';
      }
    }
    if (d >= (n + 1) / 2) {
      i = 0;
      while (a > 0) {
        if (ss[i] == '.') ss[i] = 'R', a--;
        i++;
      }
      while (b > 0) {
        if (ss[i] == '.') ss[i] = 'P', b--;
        i++;
      }
      while (c > 0) {
        if (ss[i] == '.') ss[i] = 'S', c--;
        i++;
      }
      cout << "YES" << endl;
      for (i = 0; i < n; i++) cout << ss[i];
      cout << endl;
    } else
      cout << "NO" << endl;
  }
}
