n = gets.to_i a = gets.chomp.split.map(&:to_i).map{|i| i%2} c = 0 n.times do |i| b = a.rotate(i).dup x = b.shift y = 0 b.each do |j| if x < y x += j else y += j end end c +=1 if x == y break if c > 0 end puts c == 1 ? "possible" : "impossible"