doc=Array.new
n=gets.to_i
n.times do
  x=gets.split(" ")
  case x[0]
  when "insert" then
    doc<<x[1]
  when "find" then
    if doc.include?(x[1]) then
      print "yes\n"
    else
      print "no\n"
    end
  end
end
