n = int(input())
dictionary = set()

for _ in range(n):
    cmd, arg = input().split()
    if cmd == "insert":
        dictionary.add(arg)
    elif cmd == "find":
        if arg in dictionary:
            print("yes")
        else:
            print("no") n = int(input()) n int(input()) int input() input dictionary = set() dictionary set() set for _ in range(n):
    cmd, arg = input().split()
    if cmd == "insert":
        dictionary.add(arg)
    elif cmd == "find":
        if arg in dictionary:
            print("yes")
        else:
            print("no") _ range(n) range n cmd, arg = input().split() cmd input().split() ().split () input split arg if cmd == "insert":
        dictionary.add(arg)
    elif cmd == "find":
        if arg in dictionary:
            print("yes")
        else:
            print("no") cmd == "insert" cmd "insert" dictionary.add(arg) dictionary.add dictionary add arg elif cmd == "find":
        if arg in dictionary:
            print("yes")
        else:
            print("no") cmd == "find" cmd "find" if arg in dictionary:
            print("yes")
        else:
            print("no") arg in dictionary arg dictionary print("yes") print "yes" print("no") print "no" arg = input().split() input().split() arg n = int(input()) int(input()) n cmd, arg = input().split() input().split() cmd dictionary = set() set() dictionary
n = int(input())
dictionary = set()

for _ in range(n):
    cmd, arg = input().split()
    if cmd == "insert":
        dictionary.add(arg)
    elif cmd == "find":
        if arg in dictionary:
            print("yes")
        else:
            print("no")