#include using namespace std; #define FOR(i,m,n) for(int i=(m);i<(n);++i) #define REP(i,n) FOR(i,0,n) #define ALL(v) (v).begin(),(v).end() using ll = long long; constexpr int INF = 0x3f3f3f3f; constexpr long long LINF = 0x3f3f3f3f3f3f3f3fLL; constexpr double EPS = 1e-8; constexpr int MOD = 998244353; // constexpr int MOD = 1000000007; constexpr int DY4[]{1, 0, -1, 0}, DX4[]{0, -1, 0, 1}; constexpr int DY8[]{1, 1, 0, -1, -1, -1, 0, 1}; constexpr int DX8[]{0, -1, -1, -1, 0, 1, 1, 1}; template inline bool chmax(T& a, U b) { return a < b ? (a = b, true) : false; } template inline bool chmin(T& a, U b) { return a > b ? (a = b, true) : false; } struct IOSetup { IOSetup() { std::cin.tie(nullptr); std::ios_base::sync_with_stdio(false); std::cout << fixed << setprecision(20); } } iosetup; bool can_win(const int k, const int t, const string& c) { const int n = c.length(); int l = k - 1, r = k + 1; while (l >= 0 && c[l] == c[k]) --l; while (r < n && c[r] == c[k]) ++r; return (l >= 0 && k - l <= t && (k - l) % 2 == 0) || (r < n && r - k <= t && (r - k) % 2 == 0); } int main() { int n, k, t; string c; cin >> n >> k >> t >> c; --k; if (t % 2 == 1) { if (c[k] == 'A') { bool ans = false; for (const int p : vector{k - 1, k + 1}) { if (0 <= p && p < n) { if (c[p] == 'A') { ans |= can_win(p, t - 1, c); } else if (c[p] == 'B') { ans |= !can_win(p, t - 1, c); } } } cout << (ans ? "Alice\n" : "Bob\n"); } else if (c[k] == 'B') { bool ans = false; for (const int p : vector{k - 1, k + 1}) { if (0 <= p && p < n) { if (c[p] == 'A') { ans |= !can_win(p, t - 1, c); } else if (c[p] == 'B') { ans |= can_win(p, t - 1, c); } } } cout << (ans ? "Bob\n" : "Alice\n"); } } else { cout << (can_win(k, t, c) ? "Alice\n" : "Bob\n"); } return 0; }