n = int(input())

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

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