
n = int(input())
dic = set()

for i in range(n):
    cmd = input().split()

    if cmd[0] == "insert":
        dic.add(cmd[1])
    else:
        print("yes" if cmd[1] in dic else "no") n = int(input()) n int(input()) int input() input dic = set() dic set() set for i in range(n):
    cmd = input().split()

    if cmd[0] == "insert":
        dic.add(cmd[1])
    else:
        print("yes" if cmd[1] in dic else "no") i range(n) range n cmd = input().split() cmd input().split() ().split () input split if cmd[0] == "insert":
        dic.add(cmd[1])
    else:
        print("yes" if cmd[1] in dic else "no") cmd[0] == "insert" cmd[0] cmd 0 "insert" dic.add(cmd[1]) dic.add dic add cmd[1] cmd 1 print("yes" if cmd[1] in dic else "no") print "yes" if cmd[1] in dic else "no" cmd[1] in dic cmd[1] cmd 1 dic "yes" "no" cmd = input().split() input().split() cmd dic = set() set() dic n = int(input()) int(input()) n

n = int(input())
dic = set()

for i in range(n):
    cmd = input().split()

    if cmd[0] == "insert":
        dic.add(cmd[1])
    else:
        print("yes" if cmd[1] in dic else "no")