n = int(input())
dic = set()
for i in range(n):
    order, Str = input().split()
    if order=='insert':
        dic.add(Str)
    if order=='find':
        if Str 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):
    order, Str = input().split()
    if order=='insert':
        dic.add(Str)
    if order=='find':
        if Str in dic:
            print('yes')
        else:
            print('no') i range(n) range n order, Str = input().split() order input().split() ().split () input split Str if order=='insert':
        dic.add(Str)
     order=='insert' order 'insert' dic.add(Str) dic.add dic add Str if order=='find':
        if Str in dic:
            print('yes')
        else:
            print('no') order=='find' order 'find' if Str in dic:
            print('yes')
        else:
            print('no') Str in dic Str dic print('yes') print 'yes' print('no') print 'no' n = int(input()) int(input()) n order, Str = input().split() input().split() order Str = input().split() input().split() Str dic = set() set() dic
n = int(input())
dic = set()
for i in range(n):
    order, Str = input().split()
    if order=='insert':
        dic.add(Str)
    if order=='find':
        if Str in dic:
            print('yes')
        else:
            print('no')
