island_num = gets.to_i bridge_num = island_num - 1 island_with_bridge = (0...island_num).inject({}) { |result, i| result[i] = 0; result } bridge_num.times do islands = gets.split island_with_bridge[islands[0].to_i] += 1 island_with_bridge[islands[1].to_i] += 1 end if island_with_bridge.values.find { |v| v == 0 } && island_with_bridge.values.find { |v| v == 1 } puts "Alice" else puts "Bob" end