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

typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pi;

#define rep(i,k,n) for (int i = k; i < n; ++i)
#define repr(i,k,n) for (int i = k; i >= n; --i)

int main()
{

	ios_base::sync_with_stdio(false);
	cin.tie(NULL);

#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	int t;
	cin >> t;
	while (t--)
	{
		int n; cin >> n;
		string r, b;
		cin >> r >> b;
		int count1 = 0, count2 = 0;
		rep(i, 0, n)
		{
			if (r[i] > b[i])
			{
				count1++;
			}
			else if (b[i] > r[i])
			{
				count2++;
			}
			else
			{
				count1++;
				count2++;
			}
		}
		if (count1 > count2)
		{
			cout << "RED" << endl;
		}
		else if (count2 > count1)
		{
			cout << "BLUE" << endl;
		}
		else cout << "EQUAL" << endl;
	}
}

