#include<bits/stdc++.h>
#define pb push_back
#define int long long
using namespace std;
int tt,n,dp[1001][1001][2],inf=1e9;
int rec(int n1,int n2,int rev){//n1 unsymm,n2 symm
	if(n1==0&&n2==0)return 0;
	if(dp[n1][n2][rev]!=-1)return dp[n1][n2][rev];
	int ans=-10000000;
	//reversing
	if(rev){
		ans=max(ans,-rec(n1,n2,0));
	}
	//picking an unsymm
	if(n1>=1){
		if(n1>1){
			int t=max(rec(n1-1,n2,0),rec(n1-1,n2,1));
			ans=max(ans,-1-t);
		}
		else ans=max(ans,-1-rec(n1-1,n2,0));
	}
    //picking a middle symm
    if(n2%2){
    	if(n1>=1){
    		int t=max(rec(n1,n2-1,0),rec(n1,n2-1,1));
    		ans=max(ans,-1-t);}
    	else ans=max(ans,-1-rec(n1,n2-1,0));
    }
    //picking a non middle symm
    if(n2>1){
    	int t=max(rec(n1+1,n2-2,0),rec(n1+1,n2-2,1));
    	ans=max(ans,-1-t);
    }
    return dp[n1][n2][rev]=ans;
}
void solve(){
	cin>>n;
	string s;
	cin>>s;
	int n1=0,n2=0;
	for(int i=0;i<n;i++){
		if(s[i]=='1')continue;
		if(s[i]==s[n-1-i])n2++;
		else n1++;
	}
	int ans=rec(n1,n2,0);
	if(n1>=1)ans=max(ans,rec(n1,n2,1));
	//cout<<ans<<'\n';
	if(ans>0)cout<<"ALICE\n";
	else if(ans==0)cout<<"DRAW\n";
	else cout<<"BOB\n";
	}

signed main(){
    #ifndef ONLINE_JUDGE
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
    #endif
    ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    memset(dp,-1,sizeof(dp));
    cin>>tt;
    while(tt--)
    solve();
}