#include<bits/stdc++.h>
using namespace std;

#define ll long long
int main(){
    int t;
    cin>>t;
    while(t--){
        char r[1010],b[1010];
        int n;
        cin>>n;
        scanf("%s",r+1);
        scanf("%s",b+1);

        
        int cnt1=0,cnt2=0;
        for (int i = 1; i <= n; ++i)
        {
            if(r[i]>b[i]) cnt1++;
            else if(r[i]<b[i]) cnt2++;
        }
        sort(r+1,r+n+1);
        sort(b+1,b+n+1);
        if(cnt1>cnt2)
            cout<<"RED"<<endl;
        else if(cnt1==cnt2)
            cout<<"EQUAL"<<endl;
        else
            cout<<"BLUE"<<endl;

    }
    return 0;
}