n = int(input())
lst = []

for i in range(n):
	tmp = input().split()
	lst.append(tmp)
	
d = {}

for i in range(n):
	if lst[i][0] == 'insert':
		d[lst[i][1]] = d.get(lst[i][1], 0) + 1
	elif lst[i][0] == 'find':
		print('yes') if lst[i][1] in d else print('no') n = int(input()) n int(input()) int input() input lst = [] lst [] for i in range(n):
	tmp = input().split()
	lst.append(tmp)
	 i range(n) range n tmp = input().split() tmp input().split() ().split () input split lst.append(tmp) lst.append lst append tmp d = {} d {} for i in range(n):
	if lst[i][0] == 'insert':
		d[lst[i][1]] = d.get(lst[i][1], 0) + 1
	elif lst[i][0] == 'find':
		print('yes') if lst[i][1] in d else print('no') i range(n) range n if lst[i][0] == 'insert':
		d[lst[i][1]] = d.get(lst[i][1], 0) + 1
	elif lst[i][0] == 'find':
		print('yes') if lst[i][1] in d else print('no') lst[i][0] == 'insert' lst[i][0] [i] lst i 0 'insert' d[lst[i][1]] = d.get(lst[i][1], 0) + 1 d[lst[i][1]] d lst[i][1] [i] lst i 1 d.get(lst[i][1], 0) + 1 d.get(lst[i][1], 0) d.get d get lst[i][1] [i] lst i 1 0 1 elif lst[i][0] == 'find':
		print('yes') if lst[i][1] in d else print('no') lst[i][0] == 'find' lst[i][0] [i] lst i 0 'find' print('yes') if lst[i][1] in d else print('no') lst[i][1] in d lst[i][1] [i] lst i 1 d print('yes') print 'yes' print('no') print 'no' n = int(input()) int(input()) n lst = [] [] lst d = {} {} d tmp = input().split() input().split() tmp
n = int(input())
lst = []

for i in range(n):
	tmp = input().split()
	lst.append(tmp)
	
d = {}

for i in range(n):
	if lst[i][0] == 'insert':
		d[lst[i][1]] = d.get(lst[i][1], 0) + 1
	elif lst[i][0] == 'find':
		print('yes') if lst[i][1] in d else print('no')
