 

 
#include<iostream>
#include<iomanip>
#include<map>
#include<algorithm>
#include<stdio.h>
#include<vector>
#include<cmath>
#include<set>
 
#define pi 3.141592653
#define in freopen("entrada","r",stdin);
//~ #define out freopen("myfile.txt","w",stdout);
//~ #define ii pair<ll,ll> 

#define fast_io cin.tie(0), cin.sync_with_stdio(false);
#define inf 0x3f3f3f3f
#define sup_inf 1e18
//~ #define f first
//~ #define s second
//~ #define eps 1e-9

#define nl ( no << 1)
#define nr ( no << 1)|1
#define mid l+(( r-l)>>1)
 
using namespace std;
typedef long long ll;	
typedef long double ld;
typedef unsigned long long ull;
typedef  pair < long long , pair< int,int> > iii;
typedef pair<int,int> ii;

const int maxn = 1e5 + 10;
const int MAX = 2010;

const ll mod = 1e9 + 7;
const int MAXLV = 16;

using namespace std;


 


int t;

int main (){
  //~ in
  cin >> t;
  while ( t-- ){
    int n;
    cin >>n;
    string a, b;
    cin >>a >>b;
    int ca = 0 , cb = 0;
    for(int i =0;i < n;i++) {
      if (a[i] > b[i]){
        ca++;
      }else if ( b[i] > a[i] ){
        cb++;
      }
    }
    
    if  ( ca == cb ){
      cout << "EQUAL\n";
    }else if ( ca > cb ){
      cout << "RED\n";
    }else {
      cout << "BLUE\n";
    }
  }
}
