gets res = $stdin.read.lines.map{|s| s.chomp.split}.transpose .map.with_index{|a,idx| a.delete_at(idx); [a.uniq, idx+1]} .select{|a,no| a == ["nyanpass"]} puts res.size == 1 ? res[0][1] : -1