#include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <iomanip>
#include <map>
#include <set>
#include <algorithm>
using namespace std;



int main() {
	int t;
	cin >> t;
	while (t--) {
		int n;
		cin >> n;
		string s;
		cin >> s;
		int s0 = 0;
		int a0 = 0;
		int hunwen = 1;
		for (int i = 0; i < s.size();i++) {
			if (s[i] != s[s.size()-1 - i]&&hunwen==1) {
				hunwen = 0;
			}
			if (s[i] == '0') {
				s0++;
			}
			if (s[i] == '0' && s[s.size() - 1 - i] == '1') {
				a0++;
			}
		}
		if (s[n  / 2] == '0'&&n%2!=0) {
			a0++;
		}
		if (hunwen == 1) {
		    if (n % 2 == 0) {
			     cout << "BOB" << endl;
		    }
		    else {
			     if (s0 % 2 == 0||s0==1) {
				    cout << "BOB" << endl;
			     }
			     else {
				    cout << "ALICE" << endl;
			     }
		    }
		}
		else {
			if (n % 2 == 0) {
				cout << "ALICE" << endl;
			}
			else {
				if (s0 == 2&& s[n / 2] == '0') {
					cout << "DRAW" << endl;
				}
				else {
					cout << "ALICE" << endl;
				}
			}
		}
	}
}