n = int(input())
d = {}

for i in range(n):
    line = input().split()
    if line[0] == "insert":
        d[line[1]] = 1
    elif line[0] == "find":
        if line[1] in d:
            print("yes")
        else:
            print("no") n = int(input()) n int(input()) int input() input d = {} d {} for i in range(n):
    line = input().split()
    if line[0] == "insert":
        d[line[1]] = 1
    elif line[0] == "find":
        if line[1] in d:
            print("yes")
        else:
            print("no") i range(n) range n line = input().split() line input().split() ().split () input split if line[0] == "insert":
        d[line[1]] = 1
    elif line[0] == "find":
        if line[1] in d:
            print("yes")
        else:
            print("no") line[0] == "insert" line[0] line 0 "insert" d[line[1]] = 1 d[line[1]] d line[1] line 1 1 elif line[0] == "find":
        if line[1] in d:
            print("yes")
        else:
            print("no") line[0] == "find" line[0] line 0 "find" if line[1] in d:
            print("yes")
        else:
            print("no") line[1] in d line[1] line 1 d print("yes") print "yes" print("no") print "no" line = input().split() input().split() line d = {} {} d n = int(input()) int(input()) n
n = int(input())
d = {}

for i in range(n):
    line = input().split()
    if line[0] == "insert":
        d[line[1]] = 1
    elif line[0] == "find":
        if line[1] in d:
            print("yes")
        else:
            print("no")