n = int(input())
dic = set()
for i in range(n):
    x = input()
    if 'insert' in x:
        dic.add(x.strip('insert '))
    else :
        if x.strip('find ') in dic:
            print('yes')
        else :
            print('no')
 n = int(input()) n int(input()) int input() input dic = set() dic set() set for i in range(n):
    x = input()
    if 'insert' in x:
        dic.add(x.strip('insert '))
    else :
        if x.strip('find ') in dic:
            print('yes')
        else :
            print('no') i range(n) range n x = input() x input() input if 'insert' in x:
        dic.add(x.strip('insert '))
    else :
        if x.strip('find ') in dic:
            print('yes')
        else :
            print('no') 'insert' in x 'insert' x dic.add(x.strip('insert ')) dic.add dic add x.strip('insert ') x.strip x strip 'insert ' if x.strip('find ') in dic:
            print('yes')
        else :
            print('no') x.strip('find ') in dic x.strip('find ') x.strip x strip 'find ' dic print('yes') print 'yes' print('no') print 'no' x = input() input() x dic = set() set() dic n = int(input()) int(input()) n
n = int(input())
dic = set()
for i in range(n):
    x = input()
    if 'insert' in x:
        dic.add(x.strip('insert '))
    else :
        if x.strip('find ') in dic:
            print('yes')
        else :
            print('no')

