#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <string.h>
#include <set>
#include <cmath>
using namespace std;
int main()
{
    int t,n,red,blue;
    string a,b;
    cin>>t;
    for(int i=0;i<t;i++)
    {   
        a.clear();
        b.clear();
        red=0;
        blue=0;
        cin>>n;
        cin>>a;
        cin>>b;
        for(int u=0;u<n;u++)
            if(a[u]>b[u])
                red++;
            else if(a[u]<b[u])
                blue++;
        if(red>blue)
            cout<<"RED"<<endl;
        else if(red==blue)
            cout<<"EQUAL"<<endl;
        else
            cout<<"BLUE"<<endl;   
    }
    return 0;
}
