N = gets.to_i A = gets.split.map(&:to_i) dp = Array.new(N) { Array.new(2, false) } dp[0][0] = true 1.upto(N - 1) do |i| if dp[i - 1][1] dp[i][0] = false end if A[i] > 1 && !dp[i][0] dp[i][1] = true end end if dp.last.last puts 'Alice' else puts 'Bob' end