#include <bits/stdc++.h>
using namespace std;
 int main()
 {
int t;
cin>>t;
while(t--){
    string s1,s2;
    int n;
    cin>>n;
    cin>>s1>>s2;
    // sort(s1.begin(),s1.end());
    // sort(s2.begin(),s2.end());
    // cout<<s1<<" "<<s2<<" ";
    int f1=0,f2=0;
    for(int i=0;i<n;i++){
        if(s1[i]>s2[i]){
            f1++;
            // break;
            
        }
        else if (s1[i]<s2[i]) {
            f2++;
            // break;
        }
    }
    if(f1==f2){
        cout<<"EQUAL\n";
        // continue;
    }
    else if(f1>f2) cout<<"RED\n";
    else cout<<"BLUE\n";
}
 }
