func_code_string: #include <bits/stdc++.h>   using namespace std;   signed main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     cout.tie(NULL);     long long t;     cin >> t;     while (t--) {       long long n;       cin >> n;       long long a, b, c;       cin >> a >> b >> c;       string s;       cin >> s;       long long x = 0, y = 0, z = 0;       for (long long i = 0; i < n; i++) {         if (s[i] ==  R ) {           x++;         } else if (s[i] ==  P ) {           y++;         } else {           z++;         }       }       long long win = 0;       win = min(a, z) + min(b, x) + min(c, y);       long long r = (n + 1) / 2;       if (win >= r) {         cout <<  YES  << endl;         char ans[n];         for (long long i = 0; i < n; i++) {           if (s[i] ==  S  && a) {             ans[i] =  R ;             a--;             z--;           } else if (s[i] ==  R  && b) {             ans[i] =  P ;             b--;             x--;           } else if (s[i] ==  P  && c) {             ans[i] =  S ;             c--;             y--;           } else if (s[i] ==  S  && b > x) {             ans[i] =  P ;             b--;           } else if (s[i] ==  S  && c > y) {             ans[i] =  S ;             c--;           } else if (s[i] ==  R  && a > z) {             ans[i] =  R ;             a--;           } else if (s[i] ==  R  && c > y) {             ans[i] =  S ;             c--;           } else if (s[i] ==  P  && a > z) {             ans[i] =  R ;             a--;           } else if (s[i] ==  P  && b > x) {             ans[i] =  P ;             b--;           }         }         for (long long i = 0; i < n; i++) {           cout << ans[i];         }         cout << endl;       } else {         cout <<  NO  << endl;       }     }     return 0;   }   