n = int(input())
dic = {}
for i in range(n):
    req = input().split()
    if(req[0] == "insert"):
        dic[req[1]] = i
    elif(req[0] == "find"):
        if(req[1] in dic):
               print("yes")
        else:
               print("no") n = int(input()) n int(input()) int input() input dic = {} dic {} for i in range(n):
    req = input().split()
    if(req[0] == "insert"):
        dic[req[1]] = i
    elif(req[0] == "find"):
        if(req[1] in dic):
               print("yes")
        else:
               print("no") i range(n) range n req = input().split() req input().split() ().split () input split if(req[0] == "insert"):
        dic[req[1]] = i
    elif(req[0] == "find"):
        if(req[1] in dic):
               print("yes")
        else:
               print("no") req[0] == "insert" req[0] req 0 "insert" dic[req[1]] = i dic[req[1]] dic req[1] req 1 i elif(req[0] == "find"):
        if(req[1] in dic):
               print("yes")
        else:
               print("no") req[0] == "find" req[0] req 0 "find" if(req[1] in dic):
               print("yes")
        else:
               print("no") req[1] in dic req[1] req 1 dic print("yes") print "yes" print("no") print "no" dic = {} {} dic req = input().split() input().split() req n = int(input()) int(input()) n
n = int(input())
dic = {}
for i in range(n):
    req = input().split()
    if(req[0] == "insert"):
        dic[req[1]] = i
    elif(req[0] == "find"):
        if(req[1] in dic):
               print("yes")
        else:
               print("no")
