#include<bits/stdc++.h> 
#define cpu() ios::sync_with_stdio(false); cin.tie(nullptr)
#define ps() cout << "\n"
#define pb push_back
#define ff first
#define ss second

typedef long long ll;

using namespace std;
const int MOD = 1e9 + 7, MOD1 = (119 << 23) | 1;
const int INF = 1e9 + 5, MAX = 1e3 + 5; 
int dp[MAX][MAX][2][2][2];
int mn(int x, int y){
   if(x == -67372037) return y; 
   if(y == -67372037) return x; 
   return min(x, y);
}
int DP(int x, int y, bool gu, bool time, bool turn_of){
   if(x == 0 && y == 0){
      if(turn_of){
         if(gu) return 1;
         else return 0;
      }
      else{
         if(gu) return -1; 
         else return 0;
      }
   } 
   if(dp[x][y][gu][time][turn_of] != -67372037) return dp[x][y][gu][time][turn_of];
   int num = ((turn_of)? 1 : -1);
   if(turn_of){
      if(x > 0){
         //non-palidrome
         if(!time){
            dp[x][y][gu][time][turn_of] = mn(dp[x][y][gu][time][turn_of], DP(x, y, gu, true, turn_of ^ 1));
         }
         dp[x][y][gu][time][turn_of] = mn(dp[x][y][gu][time][turn_of], DP(x - 1, y, gu, false, turn_of ^ 1) + num);
      }
      if(y > 0){
         dp[x][y][gu][time][turn_of] = mn(dp[x][y][gu][time][turn_of], DP(x + 1, y - 1, gu, false, turn_of ^ 1) + num);
      }
      if(gu){
         dp[x][y][gu][time][turn_of] = mn(dp[x][y][gu][time][turn_of], DP(x, y, false, false, turn_of ^ 1) + num);
      }
   }
   else{
      if(x > 0){
         //non-palidrome
         if(!time){
            dp[x][y][gu][time][turn_of] = max(dp[x][y][gu][time][turn_of], DP(x, y, gu, true, turn_of ^ 1));
         }
         dp[x][y][gu][time][turn_of] = max(dp[x][y][gu][time][turn_of], DP(x - 1, y, gu, time, turn_of ^ 1) + num);
      }
      if(y > 0){
         dp[x][y][gu][time][turn_of] = max(dp[x][y][gu][time][turn_of], DP(x + 1, y - 1, gu, time, turn_of ^ 1) + num);
      }
      if(gu){
         dp[x][y][gu][time][turn_of] = max(dp[x][y][gu][time][turn_of], DP(x, y, false, time, turn_of ^ 1) + num);
      }
   }
   return dp[x][y][gu][time][turn_of];
}
int main(){
   cpu();
   memset(dp, -INF, sizeof(dp));
   int t; cin >> t;
   for(int j = 1; j <= t; j++){
      int n; cin >> n; 
      string s; cin >> s; 
      int one = 0, two = 0;
      for(int i = 0; i < (n >> 1); i++){
         if(i != n - i - 1 && s[i] != s[n - 1 - i]){
            one++;
         }
         if(i != n - 1 - i && s[i] == '0' && s[n - 1 - i] == '0'){
            two++;
         }
      }
      bool gu = ((n & 1) & (s[n >> 1] == '0'));
      int cur = DP(one, two, gu, false, false);
      if(cur == 0){
         cout << "DRAW\n";
      }
      else if(cur > 0){
         cout << "ALICE\n";
      }
      else{
         cout << "BOB\n";
      }
      // cout << "----------------------\n";
   }
   return 0;
}