#include #include #include using namespace std; using ll=long long; #define rep(i,n) for(int i=0;i=0;i--) #define all(v) v.begin(),v.end() #define rall(v) v.rbegin(),v.rend() template bool chmax(T &a, T b){if (a < b){a = b;return true;} else return false;} template bool chmin(T &a, T b){if (a > b){a = b;return true;} else return false;} bool F(char c,int n,int k,int t,string&s){ int l=k,r=k; while(l>=0&&s[l]==c)l--; l++; while(r=0)f=f||!F(char('A'+'B'-c),n,k-1,t-1,s); if(k+1=t)return false; else if((t%2==1&&((l!=0&&k-l>n>>k>>t; k--; string s; cin>>s; if(F(s[k],n,k,t,s)){ if(s[k]=='A')cout<<"Alice"<<"\n"; else cout<<"Bob"<<"\n"; }else{ if(s[k]=='B')cout<<"Alice"<<"\n"; else cout<<"Bob"<<"\n"; } } }