a = gets.to_s.split.map(&.to_i) puts (Array(Int32).new(10) { |i| i + 1 } - a).join(" ")