#include<iostream>
#include<string>
using namespace std;
int  main()
{
	int t;
	cin>>t;
	for(int i=0;i<t;i++)
	{
		int n;
		string r,b;
		cin>>n;
		cin>>r>>b;
		int counter1=0,counter2=0;
		for(int i=0;i<n;i++)
		{
			if(r[i]>b[i])
				counter1++;
			else if(r[i]<b[i])
				counter2++;
		}
		if(counter1>counter2)
			cout<<"RED"<<endl;
		else if(counter1==counter2)
			cout<<"EQUAL"<<endl;
		else 
			cout<<"BLUE"<<endl;
	}
	return 0;
}