#include <bits/stdc++.h>
using namespace std;
 
int main(){
	int t;
	cin>>t;
	while(t--){
		int n;
		cin>>n;
		string s1,s2;
		cin>>s1>>s2;
		int red=0;
		int blue=0;
		for(int i=0;i<n;i++){
			if(s1[i]>s2[i]){
				red++;
			}
			else if(s1[i]==s2[i]){
				red++;
				blue++;
			}
			else{
				blue++;
			}
		}

		if(red==blue){
			cout<<"EQUAL"<<endl;
		}
		else if(red>blue){
			cout<<"RED"<<endl;
		}
		else{
			cout<<"BLUE"<<endl;
		}

	}
}