// Created by BJMinhNhut
#include <bits/stdc++.h>
using namespace std;

#define mp make_pair
#define pb push_back
#define fi first
#define se second
#define FOR(i, a, b) for(int i = a, _b = b; i <= _b; ++i) 
#define FORD(i, a, b) for(int i = a, _b = b; i >= _b; --i)
#define ALL(a) (a).begin(), (a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define MASK(i) (1ll<<(i))
typedef int64_t ll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef pair<ll, ll> pll;
typedef pair<int, int> ii;

/***End of Template***/
string s;
int n;


void Input() {
	cin >> n >> s;
}

void Solve() {
	int p = 0, ind = 0, mid = 0;
	bool palin = true;
	FOR(i, 0, n-1) {
		if (s[i] == '0' && s[n-1-i] == '0' && i < n/2) ++p;
		else if (s[i] != s[n-1-i] && s[i] == '0') ++ind;
		if (s[i] != s[n-1-i]) palin = false;
	} 

	if (n%2 && s[n/2] == '0') mid = 1;
	// cout << p << ' ' << ind << ' ' << mid << '\n';
	if (palin) {
		if (p + ind && mid) cout << "ALICE\n";
    	else cout << "BOB\n"; 
	} else {
		if (p == 0 && ind == 1 && mid == 1) cout << "DRAW\n";
		else cout << "ALICE\n";
	}
}

int main() {
    ios::sync_with_stdio(0); cin.tie(0);
    int tc; cin >> tc;
    while (tc--) {
    	Input(); Solve();
    }
    return 0;
}