#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define mod 1000000007
#define se second
#define fi first
#define pb push_back
#define mp make_pair
#define all(x) x.begin(),x.end()
#define db1(x) cout<<#x<<": "<<x<<endl;
#define db2(x, y) cout<<#x<<": "<<x<<" | "<<#y<<": "<<y<<endl;
#define db3(x, y, z) cout<<#x<<":" <<x<<" | "<<#y<<": "<<y<<" | "<<#z<<": "<<z<<endl;
#define db4(a, b, c, d) cout<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<endl;
#define yash_kakarot ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define io freopen("input.txt","r",stdin);freopen("output.txt","w",stdout);
int main()
{
    #if !ONLINE_JUDGE
    io;
    #endif
    yash_kakarot;
    int t;
    cin>>t;
    while(t--)
    {
        int n;
        cin>>n;
        string s1,s2;
        cin>>s1>>s2;
        int r=0,b=0,eq=0;
        for(int i=0;i<s1.size();i++)
        {
            if(s1[i]>s2[i])
                r++;
            else if(s1[i]<s2[i])
                b++;
            else
                eq++;
        }
        if(r>b)
        {
            cout<<"RED\n";
        }
        else if(b>r)
        {
            cout<<"BLUE\n";
        }
        else
        {
            cout<<"EQUAL\n";
        }
        

    }
}
