gets a=$<.map{|e|e.split}.transpose.each_with_index.select{|e,i|e.count('nyanpass')==e.size-1} p a.size==1 ? a[0]:-1