n = int(input())
d = {}
for i in range(n):
    x = input()
    if x[0] == "i":
        d[x[7:]] = 1
    else :
        if(x[5:] in d.keys()) : print("yes")
        else : print("no") n = int(input()) n int(input()) int input() input d = {} d {} for i in range(n):
    x = input()
    if x[0] == "i":
        d[x[7:]] = 1
    else :
        if(x[5:] in d.keys()) : print("yes")
        else : print("no") i range(n) range n x = input() x input() input if x[0] == "i":
        d[x[7:]] = 1
    else :
        if(x[5:] in d.keys()) : print("yes")
        else : print("no") x[0] == "i" x[0] x 0 "i" d[x[7:]] = 1 d[x[7:]] d x[7:] x 7: 7 1 if(x[5:] in d.keys()) : print("yes")
        else : print("no") x[5:] in d.keys() x[5:] x 5: 5 d.keys() d.keys d keys n = int(input()) int(input()) n d = {} {} d x = input() input() x
n = int(input())
d = {}
for i in range(n):
    x = input()
    if x[0] == "i":
        d[x[7:]] = 1
    else :
        if(x[5:] in d.keys()) : print("yes")
        else : print("no")
