if __name__ == "__main__":
    n = int(input())
    s_dict = {}
    for i in range(n):
        commandLine = input().split()
        if commandLine[0] == "insert":
            s_dict[commandLine[1]] = commandLine[1]
        elif commandLine[0] == "find":
            if s_dict.get(commandLine[1]) != None:
                print("yes")
            else:
                print("no")
 if __name__ == "__main__":
    n = int(input())
    s_dict = {}
    for i in range(n):
        commandLine = input().split()
        if commandLine[0] == "insert":
            s_dict[commandLine[1]] = commandLine[1]
        elif commandLine[0] == "find":
            if s_dict.get(commandLine[1]) != None:
                print("yes")
            else:
                print("no") __name__ == "__main__" __name__ "__main__" n = int(input()) n int(input()) int input() input s_dict = {} s_dict {} for i in range(n):
        commandLine = input().split()
        if commandLine[0] == "insert":
            s_dict[commandLine[1]] = commandLine[1]
        elif commandLine[0] == "find":
            if s_dict.get(commandLine[1]) != None:
                print("yes")
            else:
                print("no") i range(n) range n commandLine = input().split() commandLine input().split() ().split () input split if commandLine[0] == "insert":
            s_dict[commandLine[1]] = commandLine[1]
        elif commandLine[0] == "find":
            if s_dict.get(commandLine[1]) != None:
                print("yes")
            else:
                print("no") commandLine[0] == "insert" commandLine[0] commandLine 0 "insert" s_dict[commandLine[1]] = commandLine[1] s_dict[commandLine[1]] s_dict commandLine[1] commandLine 1 commandLine[1] commandLine 1 elif commandLine[0] == "find":
            if s_dict.get(commandLine[1]) != None:
                print("yes")
            else:
                print("no") commandLine[0] == "find" commandLine[0] commandLine 0 "find" if s_dict.get(commandLine[1]) != None:
                print("yes")
            else:
                print("no") s_dict.get(commandLine[1]) != None s_dict.get(commandLine[1]) s_dict.get s_dict get commandLine[1] commandLine 1 None print("yes") print "yes" print("no") print "no" n = int(input()) int(input()) n commandLine = input().split() input().split() commandLine s_dict = {} {} s_dict
if __name__ == "__main__":
    n = int(input())
    s_dict = {}
    for i in range(n):
        commandLine = input().split()
        if commandLine[0] == "insert":
            s_dict[commandLine[1]] = commandLine[1]
        elif commandLine[0] == "find":
            if s_dict.get(commandLine[1]) != None:
                print("yes")
            else:
                print("no")

