#include #include using namespace std; int dfs(int now, int t, vector>&dp, vector&A, bool turn){ if(dp[t][now] != -1) return dp[t][now]; if(t == 0) return dfs(now - 1, A[now - 1], dp, A, turn); if(turn){ bool f = false; for(int j = 0; j < t; j++){ f |= dfs(now, j, dp, A, !turn); } return dp[t][now] = f; } else{ bool f = true; for(int j = 0; j < t; j++){ f &= !dfs(now, j, dp, A, !turn); } return dp[t][now] = f; } } int main(){ int N; cin >> N; vector A(N); for(int i = 0; i < N; i++) { cin >> A[i]; if(A[i] > 1) A[i] = 2; } vector> dp(3, vector(N, -1)); dp[0][0] = true; bool res = dfs(N - 1, A[N - 1], dp, A, true); if(res) cout << "Alice" << endl; else cout << "Bob" << endl; }