N = int(input())
A = [input() for i in range(N)]

D = {}
for row in A:
    order, key = row.split()
    if order[0] == "i":
        D[key] = 1
    else:
        if key in D.keys():
            print("yes")
        else:
            print("no") N = int(input()) N int(input()) int input() input input() for i in range(N) for i in range(N) i range(N) range N for i in range(N) input() input A = [input() for i in range(N)] A [input() for i in range(N)] D = {} D {} for row in A:
    order, key = row.split()
    if order[0] == "i":
        D[key] = 1
    else:
        if key in D.keys():
            print("yes")
        else:
            print("no") row A order, key = row.split() order row.split() row.split row split key if order[0] == "i":
        D[key] = 1
    else:
        if key in D.keys():
            print("yes")
        else:
            print("no") order[0] == "i" order[0] order 0 "i" D[key] = 1 D[key] D key 1 if key in D.keys():
            print("yes")
        else:
            print("no") key in D.keys() key D.keys() D.keys D keys print("yes") print "yes" print("no") print "no" order, key = row.split() row.split() order N = int(input()) int(input()) N D = {} {} D key = row.split() row.split() key A = [input() for i in range(N)] [input() for i in range(N)] A
N = int(input())
A = [input() for i in range(N)]

D = {}
for row in A:
    order, key = row.split()
    if order[0] == "i":
        D[key] = 1
    else:
        if key in D.keys():
            print("yes")
        else:
            print("no")
