#include<bits/stdc++.h>
using namespace std;
int main() {
    int t;
    cin >> t;
    while (t--) {
       long long int n,ans1=0,ans2=0;
       cin>>n;
       string s1,s2;
       cin>>s1>>s2;
       long long int ff=1;
       for(int i=n-1;i>=1;i--) ff=ff*i;
       for(int i=0;i<n;i++) {
           if(s1[i]>s2[i]) ans1++;
           else if(s1[i]<s2[i]) ans2++;
       }
       if(ans1==ans2) cout<<"EQUAL\n";
       else if(ans1>ans2) cout<<"RED\n";
       else cout<<"BLUE\n";
    }
    return 0;
}