n=int(input())
dict = set()
for i in range(n):
    word= input().split()
    if word[0] == 'insert':
        dict.add(word[1])
    if word[0]=='find':
            if word[1] in dict:
             print("yes")
            else:
             print("no")
              n=int(input()) n int(input()) int input() input dict = set() dict set() set for i in range(n):
    word= input().split()
    if word[0] == 'insert':
        dict.add(word[1])
    if word[0]=='find':
            if word[1] in dict:
             print("yes")
            else:
             print("no")
              i range(n) range n word= input().split() word input().split() ().split () input split if word[0] == 'insert':
        dict.add(word[1])
     word[0] == 'insert' word[0] word 0 'insert' dict.add(word[1]) dict.add dict add word[1] word 1 if word[0]=='find':
            if word[1] in dict:
             print("yes")
            else:
             print("no")
              word[0]=='find' word[0] word 0 'find' if word[1] in dict:
             print("yes")
            else:
             print("no")
              word[1] in dict word[1] word 1 dict print("yes") print "yes" print("no") print "no" n=int(input()) int(input()) n word= input().split() input().split() word dict = set() set() dict
n=int(input())
dict = set()
for i in range(n):
    word= input().split()
    if word[0] == 'insert':
        dict.add(word[1])
    if word[0]=='find':
            if word[1] in dict:
             print("yes")
            else:
             print("no")
             
