n=int(raw_input())
a={}
for i in range(n):
	inst,key=raw_input().split()
	if inst=='insert': 
		a.update({key:i})
	elif inst=='find': 
		if a.has_key(key)==True:
			 print 'yes'
		else:print 'no' n=int(raw_input()) n int(raw_input()) int raw_input() raw_input a={} a {} for i in range(n):
	inst,key=raw_input().split()
	if inst=='insert': 
		a.update({key:i})
	elif inst=='find': 
		if a.has_key(key)==True:
			 print 'yes'
		else:print 'no' i range(n) range n inst,key=raw_input().split() inst raw_input().split() ().split () raw_input split key if inst=='insert': 
		a.update({key:i})
	elif inst=='find': 
		if a.has_key(key)==True:
			 print 'yes'
		else:print 'no' inst=='insert' inst 'insert' a.update({key:i}) a.update a update {key:i} key key i elif inst=='find': 
		if a.has_key(key)==True:
			 print 'yes'
		else:print 'no' inst=='find' inst 'find' if a.has_key(key)==True:
			 print 'yes'
		else:print 'no' a.has_key(key)==True a.has_key(key) a.has_key a has_key key True print a={} {} a n=int(raw_input()) int(raw_input()) n key=raw_input().split() raw_input().split() key inst,key=raw_input().split() raw_input().split() inst
n=int(raw_input())
a={}
for i in range(n):
	inst,key=raw_input().split()
	if inst=='insert': 
		a.update({key:i})
	elif inst=='find': 
		if a.has_key(key)==True:
			 print 'yes'
		else:print 'no'