import sys input = sys.stdin.readline TC=int(input()) for tc in range(TC): N=int(input()) S=input() r=S.find('R') w = S[:N].count('W') if w%2==0 and r>=w//2: print("YES") else: print("NO")