#include <bits/stdc++.h>
using namespace std;
int main() {
	int t; cin>>t;
	while(t--){
		int n; cin>>n;
		string a; cin>>a;
		for(auto&i:a)
			i-='0';
		int c0=0,cd=0;
		for(int i=0;i<n/2;i++){
			c0+=!a[i]&&!a[n-1-i];
			cd+=a[i]!=a[n-1-i];
		}
		if(cd==0) cout<<(n%2 and !a[n/2] and c0 ? "ALICE" : "BOB")<<endl;
		else cout<<(cd==1 and !c0 and n%2 and !a[n/2] ? "DRAW" : "ALICE")<<endl;
	}
}
