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