#include <iostream>
#include <bits/stdc++.h>

using namespace std;

int main()
{
    int T;
    cin>>T;
    for(int t=0; t<T; t++)
    {
        int n, r = 0, bl=0;
        cin >> n;
        string a, b;
        cin>>a>>b;
        for(int i=0;i<n;i++)
        {
            if(int(a[i])>int(b[i]))
            {
                r++;
            }
            else if (int(a[i]) < int(b[i]))
            {
                bl++;
            }
        }
        if(r>bl) cout<<"RED";
        else if(bl>r) cout<<"BLUE";
        else cout<<"EQUAL";
        cout<<endl;
    }

    return 0;
}