/*
	JAI JAGANNATH!
*/
//@Author : zanj0

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

#define int 			long long int

#define ff              first
#define ss              second
#define pb              push_back
#define MOD             1000000007
#define inf             1e18
#define ps(x,y)         fixed<<setprecision(y)<<x
#define w(x)            int x; cin>>x; while(x--)
#define endl       		"\n"
#define timetaken cerr<<"Time : "<<1000*(long double)clock()/(long double)CLOCKS_PER_SEC<<"ms\n"

void zanj0()
{
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#ifdef LOCAL
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
}
const int N = 1e3 + 5;
int dp[N][N][2][2][2]; // {00, 01, mid, reverse, player}
bool visited[N][N][2][2][2];
int getValue(int a, int b, int player) {
	if (player == 0) {
		return min(a, b);
	} else {
		return max(a, b);
	}
}
int dfs(int cnt00, int cnt01, int mid, int reverse, int player) {
	if (visited[cnt00][cnt01][mid][reverse][player] ) return dp[cnt00][cnt01][mid][reverse][player];

	int ret;

	if (player == 0) {
		// Alice
		// Minimise
		ret = inf;
		if (mid) {
			// cout << "HERE!" << endl;
			ret = min(ret, 1 + dfs(cnt00, cnt01, 0, 0, !player));
		}
		if (cnt00) {
			// cout << "HERE!" << endl;
			ret = min(ret, 1 + dfs(cnt00 - 1, cnt01 + 1, mid, 0, !player));
		}
		if (cnt01 && !reverse) {
			ret = min(ret, dfs(cnt00, cnt01, mid, 1, !player));
		}
		if (cnt01) {
			ret = min(ret, 1 + dfs(cnt00, cnt01 - 1, mid, 0, !player));
		}

		if (ret == inf) ret = 0;
	} else {
		// Bob
		// Maximise
		ret = -inf;

		if (mid) {
			// cout << "HERE!" << endl;
			ret = max(ret, -1 + dfs(cnt00, cnt01, 0, 0, !player));
		}
		if (cnt00) {
			// cout << "HERE!" << endl;
			ret = max(ret, -1 + dfs(cnt00 - 1, cnt01 + 1, mid, 0, !player));
		}
		if (cnt01) {
			ret = max(ret, -1 + dfs(cnt00, cnt01 - 1, mid, 0, !player));
		}
		if (cnt01 && !reverse) {
			ret = max(ret, dfs(cnt00, cnt01, mid, 1, !player));
		}
		if (ret == -inf) ret = 0;
	}
	// cout << cnt00 << " " << cnt01 << " " << mid << " " << reverse << " " << player << endl;
	// cout << ret << endl;
	visited[cnt00][cnt01][mid][reverse][player] = 1;
	return dp[cnt00][cnt01][mid][reverse][player] = ret;
}
void solve() {

	int n;
	cin >> n;
	string s;
	cin >> s;
	int cnt00 = 0;
	int cnt01 = 0;
	int i = 0;
	int j = n - 1;
	int mid = 0;
	while (i <= j) {
		if (i == j) {
			mid = s[i] == '0';
			break;
		}
		if (s[i] == s[j]) {
			cnt00 += s[i] == '0';
		} else {
			cnt01++;
		}
		i++;
		j--;
	}
	int diff = dfs(cnt00, cnt01, mid, 0, 0);
	if (diff == 0) {
		cout << "DRAW" << endl;
	} else if (diff > 0) {
		cout << "BOB" << endl;
	} else {
		cout << "ALICE" << endl;
	}

}
int32_t main()
{
	zanj0();
	w(t) solve();
	timetaken;
	return 0;
}