import sys

n = int(sys.stdin.readline())

dict = {}

for _ in range(n):
    op, key = input().split()

    if op == "insert":
        dict[key] = "insert"
        continue

    if op == "find":
        print("yes") if key in dict.keys() else print("no") import sys sys n = int(sys.stdin.readline()) n int(sys.stdin.readline()) int sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline dict = {} dict {} for _ in range(n):
    op, key = input().split()

    if op == "insert":
        dict[key] = "insert"
        continue

    if op == "find":
        print("yes") if key in dict.keys() else print("no") _ range(n) range n op, key = input().split() op input().split() ().split () input split key if op == "insert":
        dict[key] = "insert"
        continue

     op == "insert" op "insert" dict[key] = "insert" dict[key] dict key "insert" continue if op == "find":
        print("yes") if key in dict.keys() else print("no") op == "find" op "find" print("yes") if key in dict.keys() else print("no") key in dict.keys() key dict.keys() dict.keys dict keys print("yes") print "yes" print("no") print "no" key = input().split() input().split() key n = int(sys.stdin.readline()) int(sys.stdin.readline()) n dict = {} {} dict op, key = input().split() input().split() op
import sys

n = int(sys.stdin.readline())

dict = {}

for _ in range(n):
    op, key = input().split()

    if op == "insert":
        dict[key] = "insert"
        continue

    if op == "find":
        print("yes") if key in dict.keys() else print("no")
