/*
Author: Devdatta Pandey
Designation: B.Tech Student(NIT Patna) 
Date: --/--/----

Finding logic and writing code is an art. It is once intellectual property. 
So please don't copy or use it only for reference. Try to solve the question yourself.
*/ 

#include <bits/stdc++.h>
#include <unordered_set>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstring>
#include <chrono>
#include <complex>
#define endl "\n"
#define ll long long int
#define mod 1000000007
#define inf 1000000000000000001

using namespace std;

void solve()
{
    int n;
    cin >> n;
    string a, b;
    cin >> a >> b;
    // sort(a.begin(), a.end(), greater<char>());
    // sort(b.begin(), b.end(), greater<char>());

    
    int ac = 0, bc = 0;

    
    // for (int i = 0; i < n; i++)
    // {
    //     cout << a[i] << " ";
    // }
    // cout << endl;
    for (int i = 0; i < n; i++)
    {
        if(a[i] > b[i])
        ac++;
        else if(b[i] > a[i])
        bc++;
    }
    if(ac > bc)
    cout << "RED" << endl;
    else if(bc > ac)
    cout << "BLUE" << endl;
    else
    cout << "EQUAL" << endl;
}

int main()
{
	std::ios::sync_with_stdio(false);
	cin.tie(0);
    
    int tc = 1;
    cin >> tc;
    while(tc--)
    {
        solve();
    }

	return 0;
}