#include<bits/stdc++.h>
using namespace std;
int main()
{
    int T;
    cin>>T;
    while(T--)
    {
        int n;
        cin>>n;
        string A,B;
        cin>>A>>B;
        int a = 0;
        int b = 0;
        int e = 0;
        for(int i=n-1;i>=0;i--)
            if((int)A[i] > (int)B[i])
                a++;
            else if((int)B[i] > (int)A[i])
                b++;
            else e++;
        if(a>b)
            cout<<"RED"<<endl;
        else if(b>a)
            cout<<"BLUE"<<endl;
        else
            cout<<"EQUAL"<<endl;
    }
}
