https://codeforces.com/contest/1974/problem/D
#include <bits/stdc++.h>
using namespace std;
#define int long long
typedef pair<int, int> PII;
typedef vector<int> VI;
typedef vector<VI> VVI;
#define rep(i,a,n) for (int i=a;i<=n;i++)
#define per(i,a,n) for (int i=a;i>=n;i--)
#define oz 998244353
#define N 200010
#define INF 0x3f3f3f3f
typedef long long ll;
#define endl '\n'
const int mod = 1e9 + 7;
int ch[500];
void solve() {
int n;
cin >> n;
vector<char> res;
string s;
cin >> s;
int ok = 0;
ch['W'] = ch['E'] = 1;
ch['N'] = ch['S'] = 0;
for (int i = 0; i < n; i++) {
if (!ch[s[i]]) {
res.push_back('R');
ok |= 1;
}
else {
res.push_back('H');
ok |= 2;
}
ch[s[i]] ^= 1;
}
if (ok == 3 && ch['W'] == ch['E'] && ch['N'] == ch['S']) {
for (auto t : res)cout << t;
cout << endl;
}
else cout << "NO" << endl;
}
signed main() {
ios::sync_with_stdio(false);
cin.tie(0), cout.tie(0);
int T = 1;
cin >> T;
while (T --)
solve();
return 0;
}