#include <iostream>
#include <string>
#include <algorithm>

using namespace std;

void run() {
    int n;
    cin >> n;
    string a, b;
    int red = 0, blue = 0;
    cin >> a >> b;
    for (int i = 0; i < n; i++) {
        if (a[i] > b[i])
            red++;
        else if (a[i] < b[i])
            blue++;
    }
    if (red > blue)
        cout << "RED" << endl;
    else if (blue > red)
        cout << "BLUE" << endl;
    else
        cout << "EQUAL" << endl;
}

int main() {
    int t;
    cin >> t;
    while (t--) {
        run();
    }
    return 0;
}