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

for _ in range(n):
    q, X = input().split()
    if q == "insert":
        dic[X] = 1
    else:
        if X in dic.keys():
            print("yes")
        else:
            print("no") n = int(input()) n int(input()) int input() input dic = {} dic {} for _ in range(n):
    q, X = input().split()
    if q == "insert":
        dic[X] = 1
    else:
        if X in dic.keys():
            print("yes")
        else:
            print("no") _ range(n) range n q, X = input().split() q input().split() ().split () input split X if q == "insert":
        dic[X] = 1
    else:
        if X in dic.keys():
            print("yes")
        else:
            print("no") q == "insert" q "insert" dic[X] = 1 dic[X] dic X 1 if X in dic.keys():
            print("yes")
        else:
            print("no") X in dic.keys() X dic.keys() dic.keys dic keys print("yes") print "yes" print("no") print "no" n = int(input()) int(input()) n X = input().split() input().split() X dic = {} {} dic q, X = input().split() input().split() q
n = int(input())
dic = {}

for _ in range(n):
    q, X = input().split()
    if q == "insert":
        dic[X] = 1
    else:
        if X in dic.keys():
            print("yes")
        else:
            print("no")