#include <bits/stdc++.h>
#include <cmath>
#define fi first
#define sc second
#define mp make_pair
#define pb push_back
using namespace std;
typedef long long ll;
typedef double db;
 
ll tc, a, b, c, d, n;

 
int main(){
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	cin >> tc;
	while(tc--){
		string s, g;
		cin >> a >> s >> g;
		ll jaw = 0, re = 0, ge = 0;
		for(int k = 0; k < s.length(); k++){
			if(s[k] - '0' > g[k] - '0'){
				re++;
			}
			else if(s[k] - '0' < g[k] - '0'){
				ge++;
			}
		}
		if(re == ge){
			cout << "EQUAL\n";
		}
		else if(re > ge){
			cout << "RED\n";
		}
		else{
			cout << "BLUE\n";
		}
	}
}