#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;

int main()
{
    ll t;
    cin>>t;
    while(t--)
    {
        ll n;
        cin>>n;
        string s, t;
        cin>>s;
        cin>>t;
        ll r = 0, b = 0, e = 0;
        for(ll i = 0; i < n; i++)
        {
            if(s[i] > t[i]) r++;
            if(s[i] < t[i]) b++;
        }
        if(r == b) cout<<"EQUAL"<<endl;
        if(r > b) cout<<"RED"<<endl;
        if(r < b) cout<<"BLUE"<<endl;
    }
    return 0;
}
