#include <bits/stdc++.h> using namespace std; void solve(){ int n; cin >> n; string s; cin >> s; int cateAlbeInPrima = 0, cateNegreInADoua = 0; for(int i = 0; i < n; i++){ if(s[i] == 'W') cateAlbeInPrima++; } for(int i = n; i < 2 * n; i++){ if(s[i] == 'R') cateNegreInADoua++; } if(cateAlbeInPrima % 2 == 0 && cateNegreInADoua % 2 == 0 && n - cateAlbeInPrima == n - cateNegreInADoua){ cout << "YES\n"; } else{ cout << "NO\n"; } } int main(){ ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0); int t; cin >> t; while(t--){ solve(); } return 0; }