n = input()
dictInProb = set()
for i in range(int(n)):
    cmdAndStr = list(input().split())
    if cmdAndStr[0] == "insert":
        dictInProb.add(cmdAndStr[1])
    elif cmdAndStr[0] == "find":
        if cmdAndStr[1] in dictInProb:
            print("yes")
        else:
            print("no")
    else: pass n = input() n input() input dictInProb = set() dictInProb set() set for i in range(int(n)):
    cmdAndStr = list(input().split())
    if cmdAndStr[0] == "insert":
        dictInProb.add(cmdAndStr[1])
    elif cmdAndStr[0] == "find":
        if cmdAndStr[1] in dictInProb:
            print("yes")
        else:
            print("no")
    else: pass i range(int(n)) range int(n) int n cmdAndStr = list(input().split()) cmdAndStr list(input().split()) list input().split() ().split () input split if cmdAndStr[0] == "insert":
        dictInProb.add(cmdAndStr[1])
    elif cmdAndStr[0] == "find":
        if cmdAndStr[1] in dictInProb:
            print("yes")
        else:
            print("no")
    else: pass cmdAndStr[0] == "insert" cmdAndStr[0] cmdAndStr 0 "insert" dictInProb.add(cmdAndStr[1]) dictInProb.add dictInProb add cmdAndStr[1] cmdAndStr 1 elif cmdAndStr[0] == "find":
        if cmdAndStr[1] in dictInProb:
            print("yes")
        else:
            print("no")
     cmdAndStr[0] == "find" cmdAndStr[0] cmdAndStr 0 "find" if cmdAndStr[1] in dictInProb:
            print("yes")
        else:
            print("no")
     cmdAndStr[1] in dictInProb cmdAndStr[1] cmdAndStr 1 dictInProb print("yes") print "yes" print("no") print "no" dictInProb = set() set() dictInProb cmdAndStr = list(input().split()) list(input().split()) cmdAndStr n = input() input() n
n = input()
dictInProb = set()
for i in range(int(n)):
    cmdAndStr = list(input().split())
    if cmdAndStr[0] == "insert":
        dictInProb.add(cmdAndStr[1])
    elif cmdAndStr[0] == "find":
        if cmdAndStr[1] in dictInProb:
            print("yes")
        else:
            print("no")
    else: pass