#include <bits/stdc++.h>
using namespace std;

#define S second
#define F first
#define LL long long

const int N = 4e5 + 10;

LL LINF = 100000000000000000;
LL INF = 1000000000;

int a[2];

int main()
{
    // freopen("out.txt","w",stdout);
    int t;
    scanf("%d",&t);
    while(t--){
    int n;
    scanf("%d",&n);
    string s,r;
    cin>>s>>r;
    a[0]=a[1]=0;
    for(int i=0;i<n;i++)
        if(s[i]>r[i])a[0]++;
        else if(r[i]>s[i])a[1]++;

    if(a[0]==a[1])puts("EQUAL");
    else puts(a[0]>a[1]?"RED":"BLUE");
    }
}