#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
string a, b;
int t;
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cin >> t;
    while(t--) {
        int n;
        cin >> n >> a >> b;
        int ans = 0;
        for(int i=0;i<n;i++)
            ans += (a[i] > b[i]) - (a[i] < b[i]);
        if(ans > 0) cout << "RED\n";
        else if(ans < 0) cout << "BLUE\n";
        else cout << "EQUAL\n";
    }
}