def insert(dic,text):
  dic[text] = 1

def find(dic,text):
  if text in dic:
    print('yes')
  else:
    print('no')
    
num = int(input())
d = {}
while num > 0:
  ope , s = input().split()
  if ope == 'insert':
    insert(d,s)
  elif ope == 'find':
    find(d,s)  
  num -= 1 def insert(dic,text):
  dic[text] = 1 insert dic[text] = 1 dic[text] dic text 1 dic dic text text def find(dic,text):
  if text in dic:
    print('yes')
  else:
    print('no')
     find if text in dic:
    print('yes')
  else:
    print('no')
     text in dic text dic print('yes') print 'yes' print('no') print 'no' dic dic text text num = int(input()) num int(input()) int input() input d = {} d {} while num > 0:
  ope , s = input().split()
  if ope == 'insert':
    insert(d,s)
  elif ope == 'find':
    find(d,s)  
  num -= 1 num > 0 num 0 ope , s = input().split() ope input().split() ().split () input split s if ope == 'insert':
    insert(d,s)
  elif ope == 'find':
    find(d,s)  
   ope == 'insert' ope 'insert' insert(d,s) insert d s elif ope == 'find':
    find(d,s)  
   ope == 'find' ope 'find' find(d,s) find d s num -= 1 num 1 ope , s = input().split() input().split() ope d = {} {} d def insert(dic,text):
  dic[text] = 1 def insert(dic,text):
  dic[text] = 1 insert def find(dic,text):
  if text in dic:
    print('yes')
  else:
    print('no')
     def find(dic,text):
  if text in dic:
    print('yes')
  else:
    print('no')
     find s = input().split() input().split() s num -= 1 1 num num = int(input()) int(input()) num
def insert(dic,text):
  dic[text] = 1

def find(dic,text):
  if text in dic:
    print('yes')
  else:
    print('no')
    
num = int(input())
d = {}
while num > 0:
  ope , s = input().split()
  if ope == 'insert':
    insert(d,s)
  elif ope == 'find':
    find(d,s)  
  num -= 1
