n = int(raw_input())
dic = {}

for i in xrange(n):
    a, b = raw_input().split()
    if a == "insert":
        dic[b] = True
    elif a == "find":
        if b in dic:
            print "yes"
        else:
            print "no" n = int(raw_input()) n int(raw_input()) int raw_input() raw_input dic = {} dic {} for i in xrange(n):
    a, b = raw_input().split()
    if a == "insert":
        dic[b] = True
    elif a == "find":
        if b in dic:
            print "yes"
        else:
            print "no" i xrange(n) xrange n a, b = raw_input().split() a raw_input().split() ().split () raw_input split b if a == "insert":
        dic[b] = True
    elif a == "find":
        if b in dic:
            print "yes"
        else:
            print "no" a == "insert" a "insert" dic[b] = True dic[b] dic b True elif a == "find":
        if b in dic:
            print "yes"
        else:
            print "no" a == "find" a "find" if b in dic:
            print "yes"
        else:
            print "no" b in dic b dic print print n = int(raw_input()) int(raw_input()) n dic = {} {} dic a, b = raw_input().split() raw_input().split() a b = raw_input().split() raw_input().split() b
n = int(raw_input())
dic = {}

for i in xrange(n):
    a, b = raw_input().split()
    if a == "insert":
        dic[b] = True
    elif a == "find":
        if b in dic:
            print "yes"
        else:
            print "no"