import sys
dic = set()
L = sys.stdin.readlines()

for Ins in L[1:]:
    ins, op = Ins.split()
    if ins == 'insert':
        dic.add(op)
    if ins == 'find':
        print('yes' if op in dic else 'no') import sys sys dic = set() dic set() set L = sys.stdin.readlines() L sys.stdin.readlines() sys.stdin.readlines sys.stdin sys stdin readlines for Ins in L[1:]:
    ins, op = Ins.split()
    if ins == 'insert':
        dic.add(op)
    if ins == 'find':
        print('yes' if op in dic else 'no') Ins L[1:] L 1: 1 ins, op = Ins.split() ins Ins.split() Ins.split Ins split op if ins == 'insert':
        dic.add(op)
     ins == 'insert' ins 'insert' dic.add(op) dic.add dic add op if ins == 'find':
        print('yes' if op in dic else 'no') ins == 'find' ins 'find' print('yes' if op in dic else 'no') print 'yes' if op in dic else 'no' op in dic op dic 'yes' 'no' ins, op = Ins.split() Ins.split() ins dic = set() set() dic op = Ins.split() Ins.split() op L = sys.stdin.readlines() sys.stdin.readlines() L
import sys
dic = set()
L = sys.stdin.readlines()

for Ins in L[1:]:
    ins, op = Ins.split()
    if ins == 'insert':
        dic.add(op)
    if ins == 'find':
        print('yes' if op in dic else 'no')