command_num = int(input())
dict = set([])

for i in range(command_num):
    in_command, in_str = input().rstrip().split(" ")
    
    if in_command == "insert":
        dict.add(in_str)
    elif in_command == "find":
        if in_str in dict:
            print("yes")
        else:
            print("no") command_num = int(input()) command_num int(input()) int input() input dict = set([]) dict set([]) set [] for i in range(command_num):
    in_command, in_str = input().rstrip().split(" ")
    
    if in_command == "insert":
        dict.add(in_str)
    elif in_command == "find":
        if in_str in dict:
            print("yes")
        else:
            print("no") i range(command_num) range command_num in_command, in_str = input().rstrip().split(" ") in_command input().rstrip().split(" ") ().rstrip().split ().rstrip() ().rstrip () input rstrip split " " in_str if in_command == "insert":
        dict.add(in_str)
    elif in_command == "find":
        if in_str in dict:
            print("yes")
        else:
            print("no") in_command == "insert" in_command "insert" dict.add(in_str) dict.add dict add in_str elif in_command == "find":
        if in_str in dict:
            print("yes")
        else:
            print("no") in_command == "find" in_command "find" if in_str in dict:
            print("yes")
        else:
            print("no") in_str in dict in_str dict print("yes") print "yes" print("no") print "no" in_command, in_str = input().rstrip().split(" ") input().rstrip().split(" ") in_command command_num = int(input()) int(input()) command_num dict = set([]) set([]) dict in_str = input().rstrip().split(" ") input().rstrip().split(" ") in_str
command_num = int(input())
dict = set([])

for i in range(command_num):
    in_command, in_str = input().rstrip().split(" ")
    
    if in_command == "insert":
        dict.add(in_str)
    elif in_command == "find":
        if in_str in dict:
            print("yes")
        else:
            print("no")