#coding:utf-8
#1_4_C
n = int(input())
dic = set()
for i in range(n):
    cmd, word = input().split()
    if cmd == "find":
        if word in dic:
            print("yes")
        else:
            print("no")
    else:
        dic.add(word) n = int(input()) n int(input()) int input() input dic = set() dic set() set for i in range(n):
    cmd, word = input().split()
    if cmd == "find":
        if word in dic:
            print("yes")
        else:
            print("no")
    else:
        dic.add(word) i range(n) range n cmd, word = input().split() cmd input().split() ().split () input split word if cmd == "find":
        if word in dic:
            print("yes")
        else:
            print("no")
    else:
        dic.add(word) cmd == "find" cmd "find" if word in dic:
            print("yes")
        else:
            print("no")
     word in dic word dic print("yes") print "yes" print("no") print "no" dic.add(word) dic.add dic add word cmd, word = input().split() input().split() cmd n = int(input()) int(input()) n dic = set() set() dic word = input().split() input().split() word
#coding:utf-8
#1_4_C
n = int(input())
dic = set()
for i in range(n):
    cmd, word = input().split()
    if cmd == "find":
        if word in dic:
            print("yes")
        else:
            print("no")
    else:
        dic.add(word)