#include <bits/stdc++.h>
using namespace std;
#define int long long
const int M = 1e9 + 7;
 
 
int32_t main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout << setprecision(20) << fixed;
 
	int t;
	cin >> t;
	while(t--)
	{
	  int n;
      string s;
	  cin >> n;
	  cin >> s;
	  int a = 0, b = 0;
	  int l = 0, r = n-1;
	  while(l <= r)
	  {
	    if(s[l] != s[r])
	    {
	      b++;
	      s[l] = '1';
	      s[r] = '1';
	    }
	    l++;
	    r--;
	  }
	  int c = 0;
	  for(char x : s)
	    if(x == '0')
	      c++;
 
	  if(b == 1 && c == 1)
	    cout << "DRAW" << endl;
	  else if(b == 0)
	  {
	    if(n%2 == 0 || (n%2 == 1 && s[n/2] == '1') || n == 1 || c == 1)
	      cout << "BOB" << endl;
	    else
	      cout << "ALICE" << endl;
	  }
	  else
	    cout << "ALICE" << endl;
	}
 
	return 0;
}
