n = int(input())
d = {}
for i in range(n):
    a, b = input().split()
    if a == "insert":
        d[b] = 1
    else:
        print("yes" if b in d 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] = 1
    else:
        print("yes" if b in d else "no") i range(n) range n a, b = input().split() a input().split() ().split () input split b if a == "insert":
        d[b] = 1
    else:
        print("yes" if b in d else "no") a == "insert" a "insert" d[b] = 1 d[b] d b 1 print("yes" if b in d else "no") print "yes" if b in d else "no" b in d b d "yes" "no" a, b = input().split() input().split() a b = input().split() input().split() b n = int(input()) int(input()) n d = {} {} d
n = int(input())
d = {}
for i in range(n):
    a, b = input().split()
    if a == "insert":
        d[b] = 1
    else:
        print("yes" if b in d else "no")
