#include<bits/stdc++.h>
using namespace std;
int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        int n;
        cin>>n;
        string a,b;
   cin>>a>>b;
        int r=0,bl=0,i;
        for(i=0;i<n;i++)
        {
            if(a[i]>b[i])
            {
                r++;
            }
            else if(a[i]<b[i])
            {
               bl++;
            }
            else
            {
                r++;
                bl++;
            }
        }
       // cout<<r<<" "<<bl<<"\n";
        if(r>bl)
        {
            cout<<"RED"<<"\n";
        }
        else if(bl>r)
        {
            cout<<"BLUE"<<"\n";
        }
        else
        {
            cout<<"EQUAL"<<"\n";
        }
    }
}