#include<bits/stdc++.h>

using namespace std;
string a, b;
int main()
{
	ios::sync_with_stdio(false), cin.tie(0);
	int t;
	cin >> t;
	while(t --)
	{
		int n;
		int x = 0, y = 0, z = 0;
		cin >> n;
		cin >> a >> b;
		for(int i = 0; i < n; i++)
		{
			if(a[i] > b[i]) x ++;
			else if(a[i] == b[i]) y ++;
			else z ++;
		}
		if(x > z) cout << "RED" << endl;
		else if(x < z) cout << "BLUE" << endl;
		else cout << "EQUAL" << endl;
	}
	return 0;
}
