#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <bits/stdc++.h>
#include <unordered_set>
#include <unordered_map>

using namespace std;

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

int main() {
#ifdef DEBUG
	freopen("in.txt", "r", stdin);
	//    freopen("output.txt", "w", stdout);
#endif
	std::ios_base::sync_with_stdio(0); std::cin.tie(0); std::cout.tie(0);

	int t;
	cin >> t;
	while (t--) {
		int n;
		cin >> n;

		string s;
		cin >> s;

		if (is_pal(s)) {
			int zeros = 0;
			for (char ch : s) {
				if (ch == '0') {
					zeros++;
				}
			}

			if (zeros & 1 && zeros > 1) {
				cout << "ALICE";
			}
			else {
				cout << "BOB";
			}
		}
		else {
			int diff = 0;
			int zeros = 0;
			for (int i = 0, j = s.size() - 1; i < j; i++, j--) {
				if (s[i]=='0') {
					zeros++;
				}
				if (s[j]=='0') {
					zeros++;
				}
				if (s[i] != s[j]) {
					diff++;
				}
			}

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