#include using namespace std; using ll = long long; int main(){ ios::sync_with_stdio(false); cin.tie(0); int n, k, t, mn = 1 << 30; string s, s2; cin >> n >> k >> t >> s; k--; if(t <= 500){ vector> dp(n, vector(501, -1)); function rec = [&](int i, int t){ if(t == 0) return s[i] == 'A' ? 0 : 1; if(dp[i][t] != -1) return dp[i][t]; if(s[i] == 'A'){ if(i >= 1 && rec(i - 1, t - 1) == 1) return dp[i][t] = 1; if(i + 1 < n && rec(i + 1, t - 1) == 1) return dp[i][t] = 1; return dp[i][t] = 0; } if(i >= 1 && rec(i - 1, t - 1) == 0) return dp[i][t] = 0; if(i + 1 < n && rec(i + 1, t - 1) == 0) return dp[i][t] = 0; return dp[i][t] = 1; }; cout << (rec(k, t) ? "Alice" : "Bob") << '\n'; return 0; } for(int i = k; i + 1 < n; i++){ if(s[i] != s[i + 1]){ mn = min(mn, i + 1 - k); break; } } for(int i = k; i >= 1; i--){ if(s[i] != s[i - 1]){ mn = min(mn, k - (i - 1)); break; } } if(mn > t){ cout << (s[k] == 'A' ? "Bob" : "Alice") << '\n'; return 0; } char tmp = s[k]; s[k] = 'C'; vector> b; for(int i = 0; i < n; ){ int p = i; while(i < n && s[i] == s[p]) i++; b.emplace_back(s[p], i - p); } for(int i = 0; i < b.size(); i++){ char c; int v; tie(c, v) = b[i]; if(c == 'C'){ k = s2.size(); s2 += tmp; continue; } s2 += string(v % 2 + (v >= 2) * 2, c); } swap(s, s2); n = s.size(); t %= 50; t += 50; vector> dp(n, vector(101, -1)); function rec = [&](int i, int t){ if(t == 0) return s[i] == 'A' ? 0 : 1; if(dp[i][t] != -1) return dp[i][t]; if(s[i] == 'A'){ if(i >= 1 && rec(i - 1, t - 1) == 1) return dp[i][t] = 1; if(i + 1 < n && rec(i + 1, t - 1) == 1) return dp[i][t] = 1; return dp[i][t] = 0; } if(i >= 1 && rec(i - 1, t - 1) == 0) return dp[i][t] = 0; if(i + 1 < n && rec(i + 1, t - 1) == 0) return dp[i][t] = 0; return dp[i][t] = 1; }; cout << (rec(k, t) ? "Alice" : "Bob") << '\n'; }