#pragma GCC optimize ("Ofast")
#pragma GCC target ("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include "bits/stdc++.h"
using namespace std;
#define ll long long
#define pb push_back
#define all(_obj) _obj.begin(),_obj.end()
#define F first
#define S second
#define pll pair<ll, ll> 
#define vll vector<ll>
ll n,m,a,b,c,k,temp,x,y,INF=1e18;
const int MAXN=1e5+11,mod=1e9+7;
ll max(ll a,ll b) {return ((a>b)?a:b);}
ll min(ll a,ll b) {return ((a>b)?b:a);}
vll read(int n) {vll v(n);for (int i = 0; i < v.size(); i++)cin>>v[i];return v;}
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
void sol(void)
{
cin>>n;
string v1,v2;
cin>>v1>>v2;
a=0,b=0;
for(int i=0;i<n;i++)
{
 if(v1[i]>v2[i])
 a++;
 else if(v2[i]>v1[i])
 b++;
}
if(a>b)
cout<<"RED\n";
else if(b>a)
cout<<"BLUE\n";
else 
cout<<"EQUAL\n";  
return ;
}
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL),cout.tie(NULL);
    int test=1;
    cin>>test;
    while(test--) sol();
}
