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

typedef long long ll;
typedef unsigned long long ull;

/*void flyod_warshall(){
    for(int i=1;i<=n;i++){
        for(int j=1;j<=n;j++)
            if(i!=j) dp[i][j]=INT_MAX;
    }
    for(int i=1;i<=m;i++){
        int u,v,b;
        cin>>u>>v>>b;
        dp[u][v]=1;
        dp[v][u]=(b==0?1:-1);
    }
    for(int k=1;k<=n;k++){
        for(int i=1;i<=n;i++){
            for(int j=1;j<=n;j++){
                if(dp[i][k]!=INT_MAX && dp[k][j]!=INT_MAX && dp[i][k]+dp[k][j]<dp[i][j]){
                    dp[i][j]=dp[i][k]+dp[k][j];
                }
            }
        }
    }
    for(int i=1;i<=n;i++){
        for(int j=1;j<=n;j++)
            cout<<dp[i][j]<<" ";
        cout<<endl;
    }
}*/

vector<ll> prime_factorization(ull n){
    vector<ll> v;
    while(n%2==0){
        n/=2;
        v.push_back(2);
    }

    for(ll i=3;i*i<=n;i+=2){
        while(n%i==0){
            n/=i;
            v.push_back(i);
        }
    }
    if(n>2)
        v.push_back(n);
    return v;
}

ll setBitNumber(ll n)
{
    n |= n >> 1;

    n |= n >> 2;

    n |= n >> 4;
    n |= n >> 8;
    n |= n >> 16;

    n = n + 1;

    return (n >> 1);
}

ll power(ll n,ll k){
    ll ans=1;
    while(k!=0){
        if(k&1!=0){
            ans*=n;
        }
        n*=n;
        k>>=1;
    }
    return ans;
}

int binarySearch(vector<int> &arr, int l, int r, int x)
{
    if (r >= l) {
        int mid = l + (r - l) / 2;

        if (arr[mid] == x)
            return mid;

        if (arr[mid] > x)
            return binarySearch(arr, l, mid - 1, x);

        return binarySearch(arr, mid + 1, r, x);
    }

    return l;
}
bool compare(pair<int,int> &p2,pair<int,int> &p1){
    if(p1.first!=p2.first) return p1.first>p2.first;
    else return p1.second>p2.second;
}

int n;

void solve(){
    string red,blue;
    cin>>red>>blue;
    int cntr=0;
    int cntb=0;
    for(int i=0;i<n;i++){
        if(red[i]>blue[i]) cntr++;
        else if(red[i]<blue[i]) cntb++;
    }
    if(cntr>cntb) cout<<"RED\n";
    else if(cntr<cntb) cout<<"BLUE\n";
    else cout<<"EQUAL\n";
}

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    int t=1;
    cin>>t;
    while(t--){
        cin>>n;
        solve();
    }
}
