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

