n = int(input())

values = {}
for _ in range(n):
  command, value = input().split()

  if command[0] == 'i':
    values[value] = value
  if command[0] == 'f':
    if value in values:
      print ('yes')
    else:
      print ('no') n = int(input()) n int(input()) int input() input values = {} values {} for _ in range(n):
  command, value = input().split()

  if command[0] == 'i':
    values[value] = value
  if command[0] == 'f':
    if value in values:
      print ('yes')
    else:
      print ('no') _ range(n) range n command, value = input().split() command input().split() ().split () input split value if command[0] == 'i':
    values[value] = value
   command[0] == 'i' command[0] command 0 'i' values[value] = value values[value] values value value if command[0] == 'f':
    if value in values:
      print ('yes')
    else:
      print ('no') command[0] == 'f' command[0] command 0 'f' if value in values:
      print ('yes')
    else:
      print ('no') value in values value values print ('yes') print 'yes' print ('no') print 'no' n = int(input()) int(input()) n values = {} {} values command, value = input().split() input().split() command value = input().split() input().split() value
n = int(input())

values = {}
for _ in range(n):
  command, value = input().split()

  if command[0] == 'i':
    values[value] = value
  if command[0] == 'f':
    if value in values:
      print ('yes')
    else:
      print ('no')
