#include<bits/stdc++.h>
#define fre(x) freopen(#x".in","r",stdin);freopen(#x".out","w",stdout)
#define ll long long
using namespace std;
inline int read()
{
	int x=0,f=1;char c=getchar();
	while(c<'0'||c>'9') {if(c=='-') f=-1;c=getchar();}
	while(c>='0'&&c<='9') x=(x<<3)+(x<<1)+(c^'0'),c=getchar();
	return x*f;
}
const int N=1e3+5;
char a[N],b[N];
void solve()
{
	int n;
	cin>>n;
	int s1=0,s2=0;
	for(int i=1;i<=n;i++) cin>>a[i];
	for(int i=1;i<=n;i++) cin>>b[i];
	for(int i=1;i<=n;i++)
	{
		s1+=(a[i]>b[i]);
		s2+=(a[i]<b[i]);
	}
	if(s1<s2) puts("BLUE");
	else if(s1>s2) puts("RED");
	else puts("EQUAL");
}
int main()
{
	int T;
	cin>>T;
	while(T--) solve();
	return 0;
}