// C++ program to create a priority queue of pairs.
// By default a max heap is created ordered
// by first element of pair.
#include <bits/stdc++.h>

using namespace std;
bool isP(string s,int n){
    for(int i=0;i<n/2;i++){
        if(s[i]!=s[n-i-1]) return false;
    }
    return true;
}
string solve(string s,int n){
    int z=0;
    for(int i=0;i<n;i++) if(s[i]=='0') z++;
    if(isP(s,n)){
        if(z%2==0 || z==1) return "BOB";
        return "ALICE";
    }
    if(z==2 && n&1 && s[n/2]=='0') return "DRAW";
    return "ALICE";
}
int main()
{
	int t,n;
	cin>>t;
	string s;
	while(t--){
	    cin>>n;
	    cin>>s;
	    cout<<solve(s,n)<<endl;
	}
	return 0;
}
