n = int(input())
arr = {}
for i in range(n):
		cmd = input()
		if cmd[0] == "i":
			arr[cmd[7::]] = 0
		else:
			print("yes" if cmd[5:] in arr else "no") n = int(input()) n int(input()) int input() input arr = {} arr {} for i in range(n):
		cmd = input()
		if cmd[0] == "i":
			arr[cmd[7::]] = 0
		else:
			print("yes" if cmd[5:] in arr else "no") i range(n) range n cmd = input() cmd input() input if cmd[0] == "i":
			arr[cmd[7::]] = 0
		else:
			print("yes" if cmd[5:] in arr else "no") cmd[0] == "i" cmd[0] cmd 0 "i" arr[cmd[7::]] = 0 arr[cmd[7::]] arr cmd[7::] cmd 7:: 7 0 print("yes" if cmd[5:] in arr else "no") print "yes" if cmd[5:] in arr else "no" cmd[5:] in arr cmd[5:] cmd 5: 5 arr "yes" "no" cmd = input() input() cmd n = int(input()) int(input()) n arr = {} {} arr
n = int(input())
arr = {}
for i in range(n):
		cmd = input()
		if cmd[0] == "i":
			arr[cmd[7::]] = 0
		else:
			print("yes" if cmd[5:] in arr else "no")