#include <bits/stdc++.h>
using namespace std; 
#define lli long long int
#define ff first
#define ss second
const lli MOD=1e9+7;
const lli inf = 1e18;
#define TIME cerr<<"Time Taken:"<<(float)clock()/CLOCKS_PER_SEC*1000<<"ms"<<endl

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    //cout.precision(10);cout<<fixed;
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif
    lli t,n,i,x,y;
    string s1,s2;
    cin >> t;
    while(t--)
    {
        x = 0,y = 0;
        cin >> n;
        cin >> s1 >> s2;
        for(i=0;i<n;i++)
        {
            if(s1[i] > s2[i])
                x++;
            else if(s1[i] < s2[i])
                y++;
        }
        if(x > y)
            cout << "RED" << endl;
        else if(x < y)
            cout << "BLUE" << endl;
        else
            cout << "EQUAL" << endl;
    }
    TIME;
    return 0;
}