n = int(input())
l = set()

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

for i in range(n):
    cmd = input().split()
    if cmd[0] == 'insert':
        l.add(cmd[1])
    if cmd[0] == 'find':
        print('yes' if cmd[1] in l else 'no')