#include <bits/stdc++.h>

using namespace std;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);

    int t;
    cin>>t;

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

        string s2 = s;
        reverse(s2.begin(), s2.end());
        int db = 0;
        for(char c : s)
            if(c == '0')
                db++;

        if(n%2 == 1 && db == 1 && s[n/2] == '0'){
            cout<<"BOB\n";
            continue;
        }

        if(s2 == s){
            if(n%2 == 0)
                cout<<"BOB\n";
            else{
                if(db == 2 && s[n/2] == '0')
                    cout<<"DRAW\n";
                else if(s[n/2] == '0')
                    cout<<"ALICE\n";
                else
                    cout<<"BOB\n";
            }
        } else{
            if(n%2 == 1 && db == 2 && s[n/2] == '0')
                cout<<"DRAW\n";
            else
                cout<<"ALICE\n";
        }
    }

    return 0;
}
