#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
#include <fstream>
using namespace std;  
int main () {
    long long l;
    cin >> l;
    while(l--){
        int n;
        cin >> n;
        string s1, s2;
        cin >> s1 >> s2;
        int sum1 = 0;
        int sum2 = 0;
        for(int i = 0;i < n; i++){
            if(int(s1[i]) > int(s2[i])){
                sum1++;
            }
            else if(int(s1[i]) < int(s2[i])){
                sum2++;
            }
        }
        if(sum1 == sum2){
            cout << "EQUAL" << endl;
        }
        else if(sum1 > sum2){
            cout << "RED" << endl;
        }
        else{
            cout << "BLUE" << endl;
        }
    }
}
