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