#include <bits/stdc++.h>

using namespace std;

using uint = unsigned int;
using ll = long long;
using ld = long double;
using ull = unsigned long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
#define dbg(...) cerr << #__VA_ARGS__ << " ->", debug_out(__VA_ARGS__)
#define dbg_p(x) cerr<<#x": "<<(x).first<<' '<<(x).second<<endl
#define dbg_v(x, n) {cerr<<#x"[]: ";for(long long _=0;_<n;++_)cerr<<(x)[_]<<' ';cerr<<endl;}
#define all(v) v.begin(), v.end()
#define fi first
#define se second
void debug_out() { cerr << endl; }
template <typename Head, typename... Tail> void debug_out(Head H, Tail... T) { cerr << " " << H; debug_out(T...);}
 
template<typename T1, typename T2>
ostream& operator <<(ostream &out, const pair<T1, T2> &item) {
	out << '(' << item.first << ", " << item.second << ')';
	return out;
}
 
template <typename T>
ostream& operator <<(ostream &out, const vector<T>& v) {
	for(const auto &item : v) out << item << ' ';
	return out;
}

bool isPalindrome(string x)
{
	for (int i=0, j=x.size() - 1; i<j; i++, j--)
	{
		if (x[i] != x[j]) return false;
	}
	return true;
}

bool fullOne(string x)
{
	for (auto i : x)
	{
		if (i != '1')
			return false;
	}
	return true;
}

int zeros(string x)
{
	int zeros = 0;
	for (int i=0; i<x.size(); i++)
	{
		zeros += x[i] == '0';
	}
	return zeros;
}

int main()
{
	ios_base::sync_with_stdio(false);

	int t;
	cin>>t;
	while (t--)
	{
		int n;
		string s;
		cin>>n;
		cin>>s;
		if (fullOne(s))
		{
			cout<<"DRAW\n";
			continue;
		}
		if (isPalindrome(s) && zeros(s) == 1)
		{
			cout<<"BOB\n";
			continue;
		}
		if (isPalindrome(s) && s.size() % 2 == 0)
		{
			cout<<"BOB\n";
			continue;
		}
		if (isPalindrome(s) && s.size() % 2 == 1 && s[s.size()/2] == '1')
		{
			cout<<"BOB\n";
			continue;
		}

		if (!isPalindrome(s) && zeros(s) == 2 && s.size() % 2 == 1 && s[s.size()/2] == '0')
		{
			cout<<"DRAW\n";
			continue;
		}
			
		cout<<"ALICE\n";
	}

	return 0;
}