import sys
n = int(input())
d = {}
for op in sys.stdin.readlines():
    op = op.split()
    if op[0] == 'insert':
        d[op[1]] = 1  
    elif op[0] == 'find':
        if op[1] in d:
            print('yes')
        else:
            print('no') import sys sys n = int(input()) n int(input()) int input() input d = {} d {} for op in sys.stdin.readlines():
    op = op.split()
    if op[0] == 'insert':
        d[op[1]] = 1  
    elif op[0] == 'find':
        if op[1] in d:
            print('yes')
        else:
            print('no') op sys.stdin.readlines() sys.stdin.readlines sys.stdin sys stdin readlines op = op.split() op op.split() op.split op split if op[0] == 'insert':
        d[op[1]] = 1  
    elif op[0] == 'find':
        if op[1] in d:
            print('yes')
        else:
            print('no') op[0] == 'insert' op[0] op 0 'insert' d[op[1]] = 1 d[op[1]] d op[1] op 1 1 elif op[0] == 'find':
        if op[1] in d:
            print('yes')
        else:
            print('no') op[0] == 'find' op[0] op 0 'find' if op[1] in d:
            print('yes')
        else:
            print('no') op[1] in d op[1] op 1 d print('yes') print 'yes' print('no') print 'no' n = int(input()) int(input()) n d = {} {} d op = op.split() op.split() op
import sys
n = int(input())
d = {}
for op in sys.stdin.readlines():
    op = op.split()
    if op[0] == 'insert':
        d[op[1]] = 1  
    elif op[0] == 'find':
        if op[1] in d:
            print('yes')
        else:
            print('no')