N, K, T = gets.split.map(&:to_i) C = gets.chomp.chars def f(k, t, repeated = false) ch = C[k] has_same_tile = false if k > 0 && C[k - 1] == ch has_same_tile = true end if k + 1 < N && C[k - 1] == ch has_same_tile = true end if has_same_tile res = false if C[k - 1] == ch cur = k remain = t while cur > 0 && C[cur - 1] == C[cur] cur -= 1 remain -= 1 end if remain > 0 && cur > 0 && C[cur - 1] != C[cur] res |= remain.odd? end end if C[k + 1] == ch cur = k remain = t while cur + 1 < N && C[cur] == C[cur + 1] cur += 1 remain -= 1 end if remain > 0 && cur + 1 < N && C[cur] != C[cur + 1] res |= remain.odd? end end res else if t.even? false else if repeated false else res = false if t >= 2 res |= !f(k - 1, t - 1, true) if k - 1 > 0 res |= !f(k + 1, t - 1, true) if k + 1 < N else res = true end res end end end end res = f(K - 1, T) if C[K - 1] == 'A' if res puts 'Alice' else puts 'Bob' end else if res puts 'Bob' else puts 'Alice' end end