#include <bits/stdc++.h>
using namespace std;

#ifdef LOCAL
#include <debugger.h>
#else
#define dbg(x...) {}
#define dbg_t()   {}
#endif

using ll = long long;
using ld = long double;

const ll INF = 1e18;

ll dp[550][550][2][2];

void solve()
{
  ll t; cin >> t;

  memset(dp, -1, sizeof(dp));

  // dp(cnt00, cnt01, mid, rev) -> to be the minimum cost difference starter can achieve from here.

  function<ll(ll, ll, ll, ll)> rec = [&](ll cntzz, ll cntoz, ll mid, ll prev)
  {
    if (cntzz + cntoz + mid == 0)
      return 0ll;

    if (dp[cntzz][cntoz][mid][prev] != -1)
      return dp[cntzz][cntoz][mid][prev];

    ll ans = INF;
    if (prev == 0 && cntoz > 0)
      ans = min(ans, 0 - rec(cntzz, cntoz, mid, 1));
    if (cntzz > 0)
      ans = min(ans, 1 - rec(cntzz - 1, cntoz + 1, mid, 0));
    if (cntoz > 0)
      ans = min(ans, 1 - rec(cntzz, cntoz - 1, mid, 0));
    if (mid == 1)
      ans = min(ans, 1 - rec(cntzz, cntoz, 0, 0));

    return dp[cntzz][cntoz][mid][prev] = ans;
  };

  for (ll i = 0; i < t; i++)
  {
    ll n; cin >> n; 
    string s; cin >> s;
    ll cntzz = 0;
    ll cntoz = 0;
    ll l = 0, r = n - 1;
    while (l < r)
    {
      if (s[l] != s[r])
        cntoz++;
      if (s[l] == s[r])
        cntzz += (s[l] == '0');
      l++; r--;
    }
    ll mid = (n % 2 == 1) && (s[n / 2] == '0');
    ll prev = 0;
    ll res = rec(cntzz, cntoz, mid, prev);
    if (res < 0)
      cout << "ALICE" << "\n";
    else if (res > 0)
      cout << "BOB" << "\n";
    else
      cout << "DRAW" << "\n";
  } 
}


signed main()
{  
  ios::sync_with_stdio(false);
  cin.tie(0); cout.tie(0);

#ifdef LOCAL
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
#endif

  ll _t = 1;
  // cin >> _t;
  for (ll i = 1; i <= _t; i++)
  {
    // cout << "Case #" << i << ": ";
    solve();
  }

  dbg_t();
  
  return 0;
}     
     
