import sys
d={}
for e in sys.stdin.readlines()[1:]:
 if'f'==e[0]:
  print('yes'if e[5:]in d else'no')
 else:
  d[e[7:]]=0 import sys sys d={} d {} for e in sys.stdin.readlines()[1:]:
 if'f'==e[0]:
  print('yes'if e[5:]in d else'no')
 else:
  d[e[7:]]=0 e sys.stdin.readlines()[1:] sys.stdin.readlines() sys.stdin.readlines sys.stdin sys stdin readlines 1: 1 if'f'==e[0]:
  print('yes'if e[5:]in d else'no')
 else:
  d[e[7:]]=0 'f'==e[0] 'f' e[0] e 0 print('yes'if e[5:]in d else'no') print 'yes'if e[5:]in d else'no' e[5:]in d e[5:] e 5: 5 d 'yes' 'no' d[e[7:]]=0 d[e[7:]] d e[7:] e 7: 7 0 d={} {} d
import sys
d={}
for e in sys.stdin.readlines()[1:]:
 if'f'==e[0]:
  print('yes'if e[5:]in d else'no')
 else:
  d[e[7:]]=0
