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

int main() {
    int t;cin>>t;
    while(t--) {
        int n;cin>>n;
        char r[n],b[n];
        for(int i=0;i<n;i++) cin>>r[i];
        for(int i=0;i<n;i++) cin>>b[i];
        //sort(r,r+n);
        //sort(b,b+n);
        int ra=0,ba=0;
        for(int i=0;i<n;i++) {
            if(r[i]>b[i]) {
                ra++;
            }else if(b[i]>r[i]) {
                ba++;
            }
        }
        if(ra>ba) {
            cout<<"RED\n";
        }else if(ba>ra) {
            cout<<"BLUE\n";
        }else {
            cout<<"EQUAL\n";
        }
    }
    return 0;
}