#16D8101014F Kurume Ryunosuke 久留米竜之介 2018/5/16 Python3
n = int(input())
box = set()

for _ in range(n):
    tmp,mozi= input().split()
    
    if tmp == "find":
        if mozi in box:
            print("yes")
        else:
            print("no")
    else:
        box.add(mozi) n = int(input()) n int(input()) int input() input box = set() box set() set for _ in range(n):
    tmp,mozi= input().split()
    
    if tmp == "find":
        if mozi in box:
            print("yes")
        else:
            print("no")
    else:
        box.add(mozi) _ range(n) range n tmp,mozi= input().split() tmp input().split() ().split () input split mozi if tmp == "find":
        if mozi in box:
            print("yes")
        else:
            print("no")
    else:
        box.add(mozi) tmp == "find" tmp "find" if mozi in box:
            print("yes")
        else:
            print("no")
     mozi in box mozi box print("yes") print "yes" print("no") print "no" box.add(mozi) box.add box add mozi n = int(input()) int(input()) n box = set() set() box mozi= input().split() input().split() mozi tmp,mozi= input().split() input().split() tmp
#16D8101014F Kurume Ryunosuke 久留米竜之介 2018/5/16 Python3
n = int(input())
box = set()

for _ in range(n):
    tmp,mozi= input().split()
    
    if tmp == "find":
        if mozi in box:
            print("yes")
        else:
            print("no")
    else:
        box.add(mozi)
