#include <bits/stdc++.h>

using namespace std;

int main()
{
    int t;
    cin >> t;
    for (int i = 0; i < t; ++i)
    {
        int n;
        cin >> n;
        string r;
        string b;
        cin >> r >> b;
        int red = 0;
        int blue = 0;
        for (int j = 0; j < n; ++j)
        {
            if (r[j] > b[j])
            {
                ++red;
            }
            else if (r[j] < b[j])
            {
                ++blue;
            }
        }
        if (red > blue)
        {
            cout << "RED" << '\n';
        }
        else if (red < blue)
        {
            cout << "BLUE" << '\n';
        }
        else
        {
            cout << "EQUAL" << '\n';
        }
    }
}
