#include<bits/stdc++.h>
#define ll long long
#define Ant ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define pb push_back
#define test ll t;cin>>t;while(t--)
#define     min3(a,b,c)      min(a,min(b,c))
using namespace std;
#define         rep(i,n)       for ( i=0 ; i<n ; i++ )
#define         rep2(i,m)       for ( i=0 ; i<m ; i++ )
#define         rep1(i,n)      for ( i=1 ; i<=n ; i++ )
#define         yes            cout<<"YES"<<endl
#define         no             cout<<"NO"<<endl
#define         nn            <<endl
#define         sp            <<' '<<
#define MAX 10000009
#define   all(v)      v.begin(),v.end()
#define   rall(v)     v.rbegin(),v.rend()
#define print(v) for(auto it:v)cout<<it<<' '; cout<<endl;
#define     vll         vector<ll>
///digit count log10(n)+1
/*ll nCr(ll n, ll r)
{
    /// p holds the value of n*(n-1)*(n-2)...,
    // k holds the value of r*(r-1)...
    if(r > n)
        return 0;
    long long p = 1, k = 1;

   // C(n, r) == C(n, n-r),
    ///choosing the smaller value
    if (n - r < r)
        r = n - r;
    if (r != 0)
    {
        while (r)
        {
            p *= n;
            k *= r;

           // gcd of p, k
            long long m = __gcd(p, k);
            p /= m;
            k /= m;
            n--;
            r--;
        }
    }
    else
        p = 1;


    return p;

}*/
int main()
{
    Ant;
    test
    {
        ll i,n,l=0,cnt=0,mx=0;
        string q,p;
        cin>>n;
        cin>>q>>p;

        for(i=0;i<n;i++)
        {
            if(q[i]>p[i])
                l++;
            else if(q[i]<p[i])
                cnt++;
        }
        if(l>cnt)
            cout<<"RED" nn;
        else if(cnt>l)
            cout<<"BLUE" nn;
        else
        cout<<"EQUAL" nn;

    }
}


/**/
