a = {}

n = int(input())

for i in range(n):
  cmd, val = input().split()
  if cmd == 'insert':
    a[val] = val
  elif cmd == 'find':
    print('yes' if val in a else 'no') a = {} a {} n = int(input()) n int(input()) int input() input for i in range(n):
  cmd, val = input().split()
  if cmd == 'insert':
    a[val] = val
  elif cmd == 'find':
    print('yes' if val in a else 'no') i range(n) range n cmd, val = input().split() cmd input().split() ().split () input split val if cmd == 'insert':
    a[val] = val
  elif cmd == 'find':
    print('yes' if val in a else 'no') cmd == 'insert' cmd 'insert' a[val] = val a[val] a val val elif cmd == 'find':
    print('yes' if val in a else 'no') cmd == 'find' cmd 'find' print('yes' if val in a else 'no') print 'yes' if val in a else 'no' val in a val a 'yes' 'no' n = int(input()) int(input()) n cmd, val = input().split() input().split() cmd a = {} {} a val = input().split() input().split() val
a = {}

n = int(input())

for i in range(n):
  cmd, val = input().split()
  if cmd == 'insert':
    a[val] = val
  elif cmd == 'find':
    print('yes' if val in a else 'no')
