using namespace std; #include <bits/stdc++.h> #define rep(i,a,b) for(int i = a; i < b; i++) typedef long long ll; void solve() { int n; cin >> n; string s; cin >> s; n *= 2; vector<int> arr(n); rep(i,0,n) arr[i] = (s[i]=='W'); bool yes = true; int cnt = 0; rep(i,0,n/2) cnt += arr[i]; if (cnt % 2 == 1) yes = 0; rep(i,0,cnt/2) if (arr[i] != 1) yes = 0; if (yes) cout << "YES\n"; else cout << "NO\n"; } int main() { int t; cin >> t; while (t--) solve(); }