#include<iostream>
#include<algorithm>
using namespace std;
const int max_n = 1e3+100;
int n;
int main()
{
	ios::sync_with_stdio(0);
	int t;cin>>t;
	while (t--)
	{
		cin>>n;
		string s;cin>>s;
		int cnt1=0,cnt2=0;
		for (int i=0,j=n-1;i<j;++i,--j)
			if (s[i]!=s[j])++cnt1;
		for (int i=0;i<n;++i)if (s[i]=='0')++cnt2;
		if (cnt2==0)
		{
			cout<<"DRAW"<<endl;
			continue;
		}
		string ss =s;
		reverse(ss.begin(),ss.end());
		if (s==ss)
		{
			if (cnt2==1)cout<<"BOB"<<endl;
			else if (cnt2&1)cout<<"ALICE"<<endl;
			else cout<<"BOB"<<endl;
		}
		else
		{
			if (cnt1==1&&cnt2==2)cout<<"DRAW"<<endl;
			else cout<<"ALICE"<<endl;
		}
	}
}