n = int(input())
d = {}
for i in range(n):
    a, b = input().split()
    if a == "insert":
        d[b] = True
    elif a == "find":
        print("yes" if b in d.keys() else "no")
 n = int(input()) n int(input()) int input() input d = {} d {} for i in range(n):
    a, b = input().split()
    if a == "insert":
        d[b] = True
    elif a == "find":
        print("yes" if b in d.keys() else "no") i range(n) range n a, b = input().split() a input().split() ().split () input split b if a == "insert":
        d[b] = True
    elif a == "find":
        print("yes" if b in d.keys() else "no") a == "insert" a "insert" d[b] = True d[b] d b True elif a == "find":
        print("yes" if b in d.keys() else "no") a == "find" a "find" print("yes" if b in d.keys() else "no") print "yes" if b in d.keys() else "no" b in d.keys() b d.keys() d.keys d keys "yes" "no" n = int(input()) int(input()) n b = input().split() input().split() b d = {} {} d a, b = input().split() input().split() a
n = int(input())
d = {}
for i in range(n):
    a, b = input().split()
    if a == "insert":
        d[b] = True
    elif a == "find":
        print("yes" if b in d.keys() else "no")

