# coding: utf-8
d = {}
N = int(input())

for _ in range(N):
    ope, s = map(str, input().split())
    if ope == 'insert':
        d[s] = 0
    elif ope == 'find':
        if s in d.keys():
            print('yes')
        else:
            print('no')
 d = {} d {} N = int(input()) N int(input()) int input() input for _ in range(N):
    ope, s = map(str, input().split())
    if ope == 'insert':
        d[s] = 0
    elif ope == 'find':
        if s in d.keys():
            print('yes')
        else:
            print('no') _ range(N) range N ope, s = map(str, input().split()) ope map(str, input().split()) map str input().split() ().split () input split s if ope == 'insert':
        d[s] = 0
    elif ope == 'find':
        if s in d.keys():
            print('yes')
        else:
            print('no') ope == 'insert' ope 'insert' d[s] = 0 d[s] d s 0 elif ope == 'find':
        if s in d.keys():
            print('yes')
        else:
            print('no') ope == 'find' ope 'find' if s in d.keys():
            print('yes')
        else:
            print('no') s in d.keys() s d.keys() d.keys d keys print('yes') print 'yes' print('no') print 'no' ope, s = map(str, input().split()) map(str, input().split()) ope s = map(str, input().split()) map(str, input().split()) s d = {} {} d N = int(input()) int(input()) N
# coding: utf-8
d = {}
N = int(input())

for _ in range(N):
    ope, s = map(str, input().split())
    if ope == 'insert':
        d[s] = 0
    elif ope == 'find':
        if s in d.keys():
            print('yes')
        else:
            print('no')

