dic = {}
line = []
for i in range(int(input())):
    line.append(input().split())
for i in line:
    if i[0][0] == "i":
        dic[i[1]] = None
    else:
        print("yes" if i[1] in dic else "no") dic = {} dic {} line = [] line [] for i in range(int(input())):
    line.append(input().split()) i range(int(input())) range int(input()) int input() input line.append(input().split()) line.append line append input().split() ().split () input split for i in line:
    if i[0][0] == "i":
        dic[i[1]] = None
    else:
        print("yes" if i[1] in dic else "no") i line if i[0][0] == "i":
        dic[i[1]] = None
    else:
        print("yes" if i[1] in dic else "no") i[0][0] == "i" i[0][0] [0] i 0 0 "i" dic[i[1]] = None dic[i[1]] dic i[1] i 1 None print("yes" if i[1] in dic else "no") print "yes" if i[1] in dic else "no" i[1] in dic i[1] i 1 dic "yes" "no" line = [] [] line dic = {} {} dic
dic = {}
line = []
for i in range(int(input())):
    line.append(input().split())
for i in line:
    if i[0][0] == "i":
        dic[i[1]] = None
    else:
        print("yes" if i[1] in dic else "no")