n = int(input())
my_dict = {}

for i in range(n):
  order, key = input().split(' ')
  if order == 'insert':
    my_dict[key] = True
  elif order== 'find':
    if key in my_dict.keys():
      print('yes')
    else:
      print('no') n = int(input()) n int(input()) int input() input my_dict = {} my_dict {} for i in range(n):
  order, key = input().split(' ')
  if order == 'insert':
    my_dict[key] = True
  elif order== 'find':
    if key in my_dict.keys():
      print('yes')
    else:
      print('no') i range(n) range n order, key = input().split(' ') order input().split(' ') ().split () input split ' ' key if order == 'insert':
    my_dict[key] = True
  elif order== 'find':
    if key in my_dict.keys():
      print('yes')
    else:
      print('no') order == 'insert' order 'insert' my_dict[key] = True my_dict[key] my_dict key True elif order== 'find':
    if key in my_dict.keys():
      print('yes')
    else:
      print('no') order== 'find' order 'find' if key in my_dict.keys():
      print('yes')
    else:
      print('no') key in my_dict.keys() key my_dict.keys() my_dict.keys my_dict keys print('yes') print 'yes' print('no') print 'no' key = input().split(' ') input().split(' ') key n = int(input()) int(input()) n order, key = input().split(' ') input().split(' ') order my_dict = {} {} my_dict
n = int(input())
my_dict = {}

for i in range(n):
  order, key = input().split(' ')
  if order == 'insert':
    my_dict[key] = True
  elif order== 'find':
    if key in my_dict.keys():
      print('yes')
    else:
      print('no')
