#include <bits/stdc++.h>
#define ll long long
#define nl endl
#define sp ' '
#define coutvec for(int a =0;a<v.size();a++)cout<<v[a]<<sp;
#define rep(a,b,c) for(int a = b ; i<c; a++)
#define erep(a,b,c) for(int a = b ;i<=c; a++)
#define H ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
using namespace std;


int main(void)
{
    H
    ll n,m,t,z,sum =0,mx=0,l,r,b;
    cin>>n;
    while(n--)
    {
        cin>>m;
        char r[m],b[m];
        mx =0,sum =0;
        vector<int>red,blue;
        rep(i,0,m)
        {
            cin>>r[i];
            red.push_back(r[i]-'0');
        }
       // sort(red.rbegin(),red.rend());
        rep(i,0,m){
            cin>>b[i];
            blue.push_back(b[i]-'0');
           // cout<<__builtin_clz(r[i]-'0') <<sp<<__builtin_clz(b[i]-'0')<<nl;
        }
        rep(i,0,m)
        {
            if(blue[i] > red[i])
                sum++;
            else if(blue[i] <red[i]) mx++;
        }
        //sort(blue.rbegin(),blue.rend());
        /* do{
                for(int i =0;i<m;i++)
                {cout<<red[i];
                if(i == m-1) cout<<sp;}
         }



    while( next_permutation(red.begin(), red.end()));
        /*for(int i =0;i<m;i++)
        {
            next_permutation(red.begin(), red.end());
            next_permutation(blue.begin(), blue.end());
            cout<<red[i]<<sp<<blue[i]<<nl;

        }*/
        /*rep(i,0,m)
        {
            if(blue[i]>red[i])
            {
                sum++;
            }
            else if(blue[i]<red[i])
            {
                mx++;
            }
        }*/
        if(mx > sum) cout<<"RED\n";
        else if (sum > mx) cout << "BLUE\n";
        else cout << "EQUAL\n";
    }
}
