class Dictionary
  def initialize
    @values = []
  end
  def insert(value)
    @values << value
  end
  def find(value)
    if @values.include? value
      puts 'yes'
    else
      puts 'no'
    end
  end
end

n = gets.to_i
dictionary = Dictionary.new
n.times do
  input = gets.chomp.split ' '
  case input[0]
  when 'insert'
    dictionary.insert input[1]
  when 'find'
    dictionary.find input[1]
  end
end
