#include <iostream>
#include <cmath>
#include <algorithm>
#include <vector>
#include <set>
#include <unordered_set>
#include <queue>
#include <deque>
#include <string>
#include <sstream>
#include <iomanip>
#include <map>
#include <unordered_map>
#include <stack>
#include <cstdio>
#include <climits>
#include <tuple>
#include <ctime>
#include <cstring>
#include <numeric>
#include <functional>
#include <chrono>
#include <assert.h>
using ll = long long;
using namespace std;
const ll mod = 1e9 + 7;

void test_case()
{
    int n;
    cin >> n;
    string a, b;
    cin >> a >> b;
    int c = 0, c1 = 0, c2 = 0;
    for (int i = 0; i < n; i++)
    {
        if (a[i] > b[i]) c++;
        else if (a[i] < b[i]) c1++;
    }
    if (c1 > c) cout << "BLUE\n";
    else if (c > c1) cout << "RED\n";
    else cout << "EQUAL\n";
}

int main()
{
    ios::sync_with_stdio(false); cin.tie(NULL);
    int tc;
    cin >> tc;
    while (tc--)
        test_case();
    return 0;
}