dic=set()
n=int(input())
cmd=[list(input().split()) for i in range(n)]
for c, l in cmd:
    if c=="insert":
        dic.add(l)
    if c=="find":
        if l in dic:
            print("yes")
        else:
            print("no") dic=set() dic set() set n=int(input()) n int(input()) int input() input list(input().split()) for i in range(n) for i in range(n) i range(n) range n for i in range(n) list(input().split()) list input().split() ().split () input split cmd=[list(input().split()) for i in range(n)] cmd [list(input().split()) for i in range(n)] for c, l in cmd:
    if c=="insert":
        dic.add(l)
    if c=="find":
        if l in dic:
            print("yes")
        else:
            print("no") c l cmd if c=="insert":
        dic.add(l)
     c=="insert" c "insert" dic.add(l) dic.add dic add l if c=="find":
        if l in dic:
            print("yes")
        else:
            print("no") c=="find" c "find" if l in dic:
            print("yes")
        else:
            print("no") l in dic l dic print("yes") print "yes" print("no") print "no" dic=set() set() dic n=int(input()) int(input()) n cmd=[list(input().split()) for i in range(n)] [list(input().split()) for i in range(n)] cmd
dic=set()
n=int(input())
cmd=[list(input().split()) for i in range(n)]
for c, l in cmd:
    if c=="insert":
        dic.add(l)
    if c=="find":
        if l in dic:
            print("yes")
        else:
            print("no")