n = int(input())
S = {}

ans = []
for i in range(n):
	order = input().split()
	if order[0] == "insert":
		S[order[1]] = 0
	elif order[0] == "find":
		if order[1] in S:
			ans.append("yes")
		else:
			ans.append("no")

for i in range(len(ans)):
	print(ans[i]) n = int(input()) n int(input()) int input() input S = {} S {} ans = [] ans [] for i in range(n):
	order = input().split()
	if order[0] == "insert":
		S[order[1]] = 0
	elif order[0] == "find":
		if order[1] in S:
			ans.append("yes")
		else:
			ans.append("no") i range(n) range n order = input().split() order input().split() ().split () input split if order[0] == "insert":
		S[order[1]] = 0
	elif order[0] == "find":
		if order[1] in S:
			ans.append("yes")
		else:
			ans.append("no") order[0] == "insert" order[0] order 0 "insert" S[order[1]] = 0 S[order[1]] S order[1] order 1 0 elif order[0] == "find":
		if order[1] in S:
			ans.append("yes")
		else:
			ans.append("no") order[0] == "find" order[0] order 0 "find" if order[1] in S:
			ans.append("yes")
		else:
			ans.append("no") order[1] in S order[1] order 1 S ans.append("yes") ans.append ans append "yes" ans.append("no") ans.append ans append "no" for i in range(len(ans)):
	print(ans[i]) i range(len(ans)) range len(ans) len ans print(ans[i]) print ans[i] ans i n = int(input()) int(input()) n S = {} {} S ans = [] [] ans order = input().split() input().split() order
n = int(input())
S = {}

ans = []
for i in range(n):
	order = input().split()
	if order[0] == "insert":
		S[order[1]] = 0
	elif order[0] == "find":
		if order[1] in S:
			ans.append("yes")
		else:
			ans.append("no")

for i in range(len(ans)):
	print(ans[i])
