#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
#define vll vector<long long>
#define vv vector<vector<int>>
#define vp vector<pair<int,int>>
#define vi vector<int>
#define ll long long
#define ld long double
#define mp make_pair
#define ph push
#define pb push_back
#define pp pop_back()
#define np next_permutation
#define mpl map<ll,ll>
#define fin(i,a,b) for(int i=a;i<=b;i++)
#define finr(i,a,b) for(int i=a;i>=b;--i)
#define max3(a,b,c) max(max(a,b),c)
#define min3(a,b,c) min(min(a,b),c)
#define all(v) v.begin(),v.end()
#define allr(v) v.rbegin(),v.rend()
#define ff first
#define ss second
#define debug(x) cerr << #x << " = " << x << endl;
const ld EPS = 1e-9;
const ld PI = acos(-1);
const ll INF = 1e18;
const ll mod = 1e9 + 7 ;
/*template<typename... T>
void read(T&...args) {
	((std::cin >> args), ...);
}
template<typename...T>
void write(T&...args) {
	((std::cout << args << " "), ...);
}*/
using namespace std;
void solve() {
	int n;
	cin >> n;
	string s1, s2;
	cin >> s1;
	cin >> s2;
	int a = 0, b = 0, eq = 0;
	fin(i, 0, n - 1) {
		if (s1[i] - 48 > s2[i] - 48)++a;
		if (s2[i] - 48 > s1[i] - 48)++b;
		if (s1[i] == s2[i])++eq;
	}
	a = a * (eq + 1), b = b * (eq + 1);
	if (a == 0 && b == 0||(a==b)) {
		cout << "EQUAL" << endl;
	} else {
		if (a > b) {
			cout << "RED" << endl;
		} else {
			cout << "BLUE" << endl;
		}
	}
}
int main() {
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif

	int t;
	cin >> t;
	while (t--) {
		solve();
	}






	cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC << "ms\n";
	return 0;
}