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

// ---------- Debugger

#define TRACE

string to_string(string s) {
    return '"' + s + '"';
}

string to_string(const char * s) {
    return to_string((string) s);
}

string to_string(bool b) {
    return (b ? "true" : "false");
}

template < typename A >
string to_string(A v);

template < typename A, typename B >
string to_string(pair < A, B > p) {
    return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}

template < typename A >
string to_string(A v) {
    bool first = true;
    string res = "[";
    for (const auto & x: v) {
        if (!first) {
            res += ", ";
        }
        first = false;
        res += to_string(x);
    }
    res += "]";
    return res;
}

#ifdef TRACE
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template < typename Head >
void __f(const string names, Head arg1) {
    cerr << names << " : " << to_string(arg1) << endl;
}
template < typename Head, typename...Tail >
void __f(const string names, Head arg1, Tail...args) {
    size_t comma = names.find(',');
    cerr << names.substr(0, comma) << " : " << to_string(arg1) << " | ";
    __f(names.substr(comma + 1), args...);
}
#else
#define trace(...)
#endif

// ---------- Debugger

#define LL long long
#define FI ios_base::sync_with_stdio(false); cin.tie(NULL);
#define PREC cout << setprecision(10) << fixed;

const int MOD = 1e9 + 7;
const int INF = 1e9 + 9;
const int MX = 1e5 + 5;

int main() {
	int tt;
	cin >> tt;
	while(tt--) {
		int n;
		string a;
		string b;
		int cnt1 = 0;
		int cnt2 = 0;

		cin >> n >> a >> b;

		for(int i=0;i<n;i++) {
			if(a[i] > b[i]) cnt1++;
			else if(b[i] > a[i]) cnt2++;
		}

		if(cnt1 > cnt2) {
			cout << "RED" << endl;
		}
		else if(cnt2 > cnt1) {
			cout << "BLUE" << endl;
		}
		else {
			cout << "EQUAL" << endl;
		}
	
	}
	
	return 0;
}






















