#include<bits/stdc++.h>
#define  MX      100005
#define  ff      first
#define  ss      second
#define  pb      push_back
#define  int     long long
#define  PII     pair<int,int>
#define  all(v)  v.begin(),v.end()
#define  pi      acos(-1)
#define  mod     1000000007
using namespace std;

signed main()
{
   //ios::sync_with_stdio(0);
   //cin.tie(0);
   //cout.tie(0);
   int t,n;
   string s,r;
   cin>>t;
   while(t--){
        cin>>n>>s;
        r=s;
        reverse(r.begin(),r.end());
        bool p=false;
        if(r==s)p=true;
        int zero=0;
        for(char c : s)if(c=='0')zero++;
        if(!p&&(n&1)&&s[n/2]=='0'&&zero==2)cout<<"DRAW"<<endl;
        else if(!p||(zero&1)&&zero>1)cout<<"ALICE"<<endl;
        else cout<<"BOB"<<endl;
   }

   return 0;
}
