#include <iostream>
#include <cstdio>
#include <cstring>
#include <vector>
#include <algorithm>
#include <string>
#include <sstream>

using namespace std;

int main() {
    //freopen("A.in", "rt", stdin);
    std::ios::sync_with_stdio(false);

    int T;
    cin >> T;
    
    for (int t = 0; t < T; ++t) {
        int n;
        cin >> n;
        string r, b;
        cin >> r >> b;
        
        int R = 0;
        int B = 0;
        for (int i = 0; i < n; ++i) {
            if (r[i] > b[i]) ++R;
            else if (b[i] > r[i]) ++B;
        }
        
        cout << ((R > B) ? "RED" : ((B > R) ? "BLUE" : "EQUAL")) << endl;
    }

    return 0;
}
