line = gets.split.map(&:to_i).first result = "" line.times do if gets.include?("love") result = "YES" else result = "NO" end end