order_num = int(input())
jisho = {}
for _i in range(order_num):
    order, key = input().split()
    if order == 'insert':
        jisho[key] = ''
    elif order == 'find':
        try:
            jisho[key]
            print('yes')
        except KeyError:
            print('no') order_num = int(input()) order_num int(input()) int input() input jisho = {} jisho {} for _i in range(order_num):
    order, key = input().split()
    if order == 'insert':
        jisho[key] = ''
    elif order == 'find':
        try:
            jisho[key]
            print('yes')
        except KeyError:
            print('no') _i range(order_num) range order_num order, key = input().split() order input().split() ().split () input split key if order == 'insert':
        jisho[key] = ''
    elif order == 'find':
        try:
            jisho[key]
            print('yes')
        except KeyError:
            print('no') order == 'insert' order 'insert' jisho[key] = '' jisho[key] jisho key '' elif order == 'find':
        try:
            jisho[key]
            print('yes')
        except KeyError:
            print('no') order == 'find' order 'find' try:
            jisho[key]
            print('yes')
        except KeyError:
            print('no') except KeyError:
            print('no') print('no') print 'no' jisho[key] jisho key print('yes') print 'yes' order_num = int(input()) int(input()) order_num key = input().split() input().split() key jisho = {} {} jisho order, key = input().split() input().split() order
order_num = int(input())
jisho = {}
for _i in range(order_num):
    order, key = input().split()
    if order == 'insert':
        jisho[key] = ''
    elif order == 'find':
        try:
            jisho[key]
            print('yes')
        except KeyError:
            print('no')
