n = int(input())
data = set()
for _ in range(n):
    command = input().split()
    if command[0] == "insert":
        data.add(command[1])
    elif command[0] == "find":
        if command[1] in data:
            print("yes")
        else:
            print("no") n = int(input()) n int(input()) int input() input data = set() data set() set for _ in range(n):
    command = input().split()
    if command[0] == "insert":
        data.add(command[1])
    elif command[0] == "find":
        if command[1] in data:
            print("yes")
        else:
            print("no") _ range(n) range n command = input().split() command input().split() ().split () input split if command[0] == "insert":
        data.add(command[1])
    elif command[0] == "find":
        if command[1] in data:
            print("yes")
        else:
            print("no") command[0] == "insert" command[0] command 0 "insert" data.add(command[1]) data.add data add command[1] command 1 elif command[0] == "find":
        if command[1] in data:
            print("yes")
        else:
            print("no") command[0] == "find" command[0] command 0 "find" if command[1] in data:
            print("yes")
        else:
            print("no") command[1] in data command[1] command 1 data print("yes") print "yes" print("no") print "no" n = int(input()) int(input()) n command = input().split() input().split() command data = set() set() data
n = int(input())
data = set()
for _ in range(n):
    command = input().split()
    if command[0] == "insert":
        data.add(command[1])
    elif command[0] == "find":
        if command[1] in data:
            print("yes")
        else:
            print("no")
