func_code_string: #include <bits/stdc++.h>   using namespace std;   string w =   RPS ;   string s;   int t[4], n, m, a[105], ans[105];   int main() {     ios::sync_with_stdio(0);     int Q;     cin >> Q;     while (Q--) {       memset(ans, 0, sizeof(ans));       cin >> n >> t[1] >> t[2] >> t[3] >> s;       m = (n + 1) / 2;       for (int i = 0; i < n; i++) switch (s[i]) {           case  R :             a[i] = 2;             break;           case  P :             a[i] = 3;             break;           case  S :             a[i] = 1;             break;         }       for (int i = 0; i < n; i++)         if (t[a[i]]) {           t[a[i]]--;           ans[i] = a[i];         }       if (n - (t[1] + t[2] + t[3]) < (n + 1) / 2) {         cout <<  NO n ;         continue;       }       cout <<  YES n ;       for (int i = 0; i < n; i++)         if (!ans[i]) {           for (int j = 1; j <= 3; j++)             if (t[j]) {               t[j]--, ans[i] = j;               break;             }         }       for (int i = 0; i < n; i++) cout << w[ans[i]];       cout << endl;     }     return 0;   }   