// Author: Vinay Khilwani
// Language: C++
 
// @vok8: Codeforces, AtCoder, LeetCode, HackerEarth, TopCoder, Google, FB, CSES, Spoj, GitHub, BinarySearch
// @vok_8: CodeChef, GFG
// @vok8_khilwani: HackerRank
 
// Never Stop Trying.
// Trying to be Better than Myself.
 
// while (true)
// {
//     if (AC)
//     {
//         break;
//     }
//     else if (Contest Over)
//     {
//         Try.
//         Check out Editorial.
//         Understand.
//         Find out your Mistake.
//         Learn the topic (if new).
//         Solve Problems on that topic (if new).
//         Upsolve that problem.
//         break;
//     }
//     else
//     {
//         Try.
//         Use Pen-Paper.
//         Find errors, edge cases, etc.
//         continue;
//     }
// }
 
// Optimizations
#pragma GCC optimize ("O2")
#pragma GCC optimize ("unroll-loops")
#pragma GCC target ("avx2")
#pragma GCC optimize ("Os")
 
// Libraries
#include <bits/stdc++.h>
using namespace std;
 
// Defines
#define fast ios_base::sync_with_stdio(false); cout.tie(NULL); cin.tie(NULL);
#define sz(a) int(a.size())
#define all(a) (a).begin(),(a).end()
#define pb push_back
using ll = long long int;
using ld = long double;
const ll mod = (ll) (1e9) + 7LL;
const ll M = 998244353LL;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
const ld pi = acos(-1);

// Global Variable(s)

// Solver Function(s)
void solve()
{
    int n;
    string s;
    cin >> n >> s;
    if (n == 1)
    {
    	cout << "BOB\n";
    	return;
    }
    int away_from_pal = 0;
    int z_z = 0;
    for (int i = 0; i < n / 2; i++)
    {
    	if (s[i] != s[n - 1 - i])
    	{
    		away_from_pal++;
    	}
    	else
    	{
    		if (s[i] == '0')
    		{
    			z_z += 2;
    		}
    	}
    }
    if (n % 2 && s[n / 2] == '0')
    {
    	z_z++;
    }
    if (away_from_pal == 1)
    {
    	if (z_z == 1)
    	{
    		cout << "DRAW\n";
    	}
    	else
    	{
    		cout << "ALICE\n";
    	}
    	return;
    }
    if (away_from_pal != 0)
    {
    	cout << "ALICE\n";
    }
    else
    {
    	if (z_z % 2 == 0 || z_z == 1)
    	{
    		cout << "BOB\n";
    	}
    	else
    	{
    		cout << "ALICE\n";
    	}
    }
}
 
// Main Function
int main()
{
    fast
    int t = 1;
    cin >> t;
    while (t--)
    {
        solve();
    }
    return 0;
} 