num = gets.chomp.split num.map!{|n| n.to_i} for i in 1..10 if num[0] != 1 puts 1 elsif num [i] + 1 != num[i + 1] puts num[i] + 1 end end