#include <bits/stdc++.h>
using namespace std;
int main() {
    int t;cin>>t;
    while(t--){
        int n;cin>>n;
        vector<int> r;vector<int> b;
        for(int i=0;i<n;i++){char k;cin>>k;r.push_back(k-'0');}
        for(int i=0;i<n;i++){char k;cin>>k;b.push_back(k-'0');}
        int ri=0;
        for(int i=0;i<n;i++){if(r[i]>b[i])ri++;else if(r[i]<b[i])ri--;}
        if(ri>0)cout<<"RED"<<endl;
        else if(ri<0)cout<<"BLUE"<<endl;
        else cout<<"EQUAL"<<endl;
    }
    return 0;
}
