#include<bits/stdc++.h>
#define ll long long
#define pii pair<ll,ll>
#define debug(a) cout<<a<<'\n'
#define maxn 200009 /// I wanna be withma youlu
#define MOD 1000000007
#define F first
#define S second
#define rep(i, a, b) for(ll i = a; i < (b); ++i)
#define per(i, b, a) for(ll i = b-1; i>=a ; i--)
#define trav(a, x) for(auto& a : x)
#define allin(a , x) for(auto a : x)
#define all(x) begin(x), end(x) 
#define sz(x) (ll)(x).size()
using namespace std;
const ll INF = 1e9 + 9;
int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    ll t;
    cin>>t;
    while(t--){
        ll n;
        cin>>n;
        string s,s2;
        cin>>s>>s2;
        ll conta = 0,contb = 0;
        rep(i,0,n){
            if(s[i] - '0' > s2[i] - '0')conta++;
            else if(s[i] - '0' < s2[i] - '0')contb++;
        }
        // cout<<conta<<" "<<contb<<endl;
        if(conta > contb) cout<<"RED\n";
        else if(conta == contb) cout<<"EQUAL\n";
        else cout<<"BLUE\n";
    }
    return 0;  
}   