#include <bits/stdc++.h> 
using namespace std; 
#define ll long long int 
int main()
{
           int t;
           cin>>t;
           while(t--)
           {
                      int n,m,i,c1=0,c2=0;
                      cin>>n;
                      string v1,v2;
                      cin>>v1>>v2;
                      for(i=0;i<n;i++)
                      {
                                 if(v1[i]>v2[i])
                                     c1++;
                                 else if(v2[i]>v1[i])
                                     c2++;
                      }
                      if(c1>c2)
                          cout<<"RED"<<"\n";
                      else if(c2>c1)
                          cout<<"BLUE"<<"\n";
                      else
                          cout<<"EQUAL"<<"\n";
           }
}