n = gets.to_i
dic = []
n.each do |i|
  order, word = gets.chomp.split(" ").map(&:to_i)
  if(order=="insert") then
    dic.add("word")
  end
  if(order=="find")
    found = false
    dic.each do |item|
      if (word == item) then
        found = true
      end
    end
    if (found == true) then
      puts yes
    else
      puts no
    end
  end
end