# -*- conding:utf-8 -*-


se = set()
n = int(input())
tmp = [input().split() for i in range(n)]


for i in tmp:
    cmd, v = i
    if cmd == "find":
        if v in se:
            print("yes")
        else:
            print ("no")
    else:
        se.add(v) se = set() se set() set n = int(input()) n int(input()) int input() input input().split() for i in range(n) for i in range(n) i range(n) range n for i in range(n) input().split() ().split () input split tmp = [input().split() for i in range(n)] tmp [input().split() for i in range(n)] for i in tmp:
    cmd, v = i
    if cmd == "find":
        if v in se:
            print("yes")
        else:
            print ("no")
    else:
        se.add(v) i tmp cmd, v = i cmd i v if cmd == "find":
        if v in se:
            print("yes")
        else:
            print ("no")
    else:
        se.add(v) cmd == "find" cmd "find" if v in se:
            print("yes")
        else:
            print ("no")
     v in se v se print("yes") print "yes" print ("no") print "no" se.add(v) se.add se add v tmp = [input().split() for i in range(n)] [input().split() for i in range(n)] tmp cmd, v = i i cmd v = i i v n = int(input()) int(input()) n se = set() set() se
# -*- conding:utf-8 -*-


se = set()
n = int(input())
tmp = [input().split() for i in range(n)]


for i in tmp:
    cmd, v = i
    if cmd == "find":
        if v in se:
            print("yes")
        else:
            print ("no")
    else:
        se.add(v)