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

signed main(){
   int t;
   cin>>t;
   while(t--){
      int n;
      cin>>n;
      string s;
      cin>>s;
      int p=0, q=0, r=0;
      for(int i=0;i<n;i++){
        if(s[i]=='0')
            p++;
        if(i<n/2 && s[i]!=s[n-1-i])
            r++;
      }
      if(n%2 && s[n/2]=='0')
         q=1;
      if(r)
      {
          if(p==0){
            cout<<"DRAW"<<endl;
          }
          else if(p==2){
            if(q)
                cout<<"DRAW"<<endl;
            else
                cout<<"ALICE"<<endl;
          }
          else
            cout<<"ALICE"<<endl;
      }
      else{
        if(q){
          if(p==0)
            cout<<"DRAW"<<endl;
          else if(p==1)
          {
            cout<<"BOB"<<endl;
          }
          else
            cout<<"ALICE"<<endl;
        }
        else{
          if(p==0)
            cout<<"DRAW"<<endl;
          else
            cout<<"BOB"<<endl;
        }
      }
   }
}
