#include #include using namespace std; using namespace atcoder; typedef int64_t lint; #define rep(i, n) for(int i=0; i; using vvi = vector>; template inline void vin(vector& v) { rep(i, v.size()) cin >> v.at(i); } template inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } template inline void drop(T x) { cout << x << endl; exit(0); } template void vout(vector v) { rep(i, v.size()) { cout << v.at(i) << ' '; } cout << endl; } constexpr lint LINF = LLONG_MAX/2; lint N, K, T; string S; string solve() { lint a=0, b=0, c=0, x, y, z; repx(i, K+1, N+1) { if (i == N) a = -1; else if (S[i] == S[K]) a++; else break; } for (lint i = K-1; i >= -1; i--) { if (i == -1) b = -1; else if (S[i] == S[K]) b++; else break; } if (a > b) swap(a, b); if (a == -1) { if (b == -1) { if (S[K] == 'A') return "Bob"; else return "Alice"; } else if (T <= b) { if (S[K] == 'A') return "Bob"; else return "Alice"; } else if (b%2 != T%2) { if (S[K] == 'A') return "Alice"; else return "Bob"; } else { if (S[K] == 'A') return "Bob"; else return "Alice"; } } else if (a == 0 && b == 0) { return "Empty"; } else if (a%2 != b%2) { if (T <= a) { if (S[K] == 'A') return "Bob"; else return "Alice"; } if (S[K] == 'A') return "Alice"; else return "Bob"; } else { if (T <= a) { if (S[K] == 'A') return "Bob"; else return "Alice"; } if (b%2 != T%2) { if (S[K] == 'A') return "Alice"; else return "Bob"; } else { if (S[K] == 'A') return "Bob"; else return "Alice"; } } } int main() { cin >> N >> K >> T >> S; K--; lint a=0, b=0, c=0, x, y, z; string t = solve(); if (t != "Empty") drop(t); T--; string t1, t2; if (K == 0) t1 = "Empty"; else { K--; t1 = solve(); K++; } if (K == N-1) t2 = "Empty"; else { K++; t2 = solve(); K--; } T++; if (t1 == "Empty" && t2 == "Empty") { if (T%2) { if (S[K] == 'A') drop("Alice"); else drop("Bob"); } else { if (S[K] == 'A') drop("Bob"); else drop("Alice"); } } else if (t1 == "Empty") { if (t2 == "Alice" && S[K] == 'B' && T%2) drop("Bob"); if (t2 == "Bob" && S[K] == 'A' && T%2) drop("Alice"); drop(t2); } else if (t2 == "Empty") { if (t2 == "Alice" && S[K] == 'B' && T%2) drop("Bob"); if (t2 == "Bob" && S[K] == 'A' && T%2) drop("Alice"); drop(t1); } else if (t1 != t2) { if (S[K] == 'A') drop("Alice"); else drop("Bob"); } else { drop(t1); } }