# coding: utf-8
# Your code here!
dic = set()
def insert(s):
    dic.add(s)
def find(s):
    if s in dic:
        print("yes")
    else:
        print("no")
i = int(input())
for c in range(i):
    op,s = map(str,input().split())
    if op == "insert":
        insert(s)
    elif op == "find":
        find(s) dic = set() dic set() set def insert(s):
    dic.add(s) insert dic.add(s) dic.add dic add s s s def find(s):
    if s in dic:
        print("yes")
    else:
        print("no") find if s in dic:
        print("yes")
    else:
        print("no") s in dic s dic print("yes") print "yes" print("no") print "no" s s i = int(input()) i int(input()) int input() input for c in range(i):
    op,s = map(str,input().split())
    if op == "insert":
        insert(s)
    elif op == "find":
        find(s) c range(i) range i op,s = map(str,input().split()) op map(str,input().split()) map str input().split() ().split () input split s if op == "insert":
        insert(s)
    elif op == "find":
        find(s) op == "insert" op "insert" insert(s) insert s elif op == "find":
        find(s) op == "find" op "find" find(s) find s i = int(input()) int(input()) i op,s = map(str,input().split()) map(str,input().split()) op dic = set() set() dic def insert(s):
    dic.add(s) def insert(s):
    dic.add(s) insert s = map(str,input().split()) map(str,input().split()) s def find(s):
    if s in dic:
        print("yes")
    else:
        print("no") def find(s):
    if s in dic:
        print("yes")
    else:
        print("no") find
# coding: utf-8
# Your code here!
dic = set()
def insert(s):
    dic.add(s)
def find(s):
    if s in dic:
        print("yes")
    else:
        print("no")
i = int(input())
for c in range(i):
    op,s = map(str,input().split())
    if op == "insert":
        insert(s)
    elif op == "find":
        find(s)
