#include<bits/stdc++.h>
using namespace std;
int main()
{
	long long t,n;
	cin>>t;
	while(t--)
	{
		cin>>n;
		string s;
		cin>>s;
		int c=0;
		for(int i=0;i<n;i++)
			if (s[i]=='0')
				c++;
		string t=s;
		reverse(t.begin(),t.end());
		if (s==t)
		{
		if (c==1)
			cout<<"BOB\n";
		else if (c==0)
			cout<<"DRAW\n";
		else if (n%2&&s[n/2]=='0')
			cout<<"ALICE\n";
		else
			cout<<"BOB\n";
		}
		else if (c==2&&n%2&&s[n/2]=='0')
			cout<<"DRAW\n";
		else
			cout<<"ALICE\n";
	}
}