n = int(input())
d = {}
for i in range(n):
    cmd = input()
    if cmd[0] == 'i':
        d[cmd[7:]] = 0
    else:
        print('yes' if cmd[5:] in d else 'no') n = int(input()) n int(input()) int input() input d = {} d {} for i in range(n):
    cmd = input()
    if cmd[0] == 'i':
        d[cmd[7:]] = 0
    else:
        print('yes' if cmd[5:] in d else 'no') i range(n) range n cmd = input() cmd input() input if cmd[0] == 'i':
        d[cmd[7:]] = 0
    else:
        print('yes' if cmd[5:] in d else 'no') cmd[0] == 'i' cmd[0] cmd 0 'i' d[cmd[7:]] = 0 d[cmd[7:]] d cmd[7:] cmd 7: 7 0 print('yes' if cmd[5:] in d else 'no') print 'yes' if cmd[5:] in d else 'no' cmd[5:] in d cmd[5:] cmd 5: 5 d 'yes' 'no' n = int(input()) int(input()) n cmd = input() input() cmd d = {} {} d
n = int(input())
d = {}
for i in range(n):
    cmd = input()
    if cmd[0] == 'i':
        d[cmd[7:]] = 0
    else:
        print('yes' if cmd[5:] in d else 'no')