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