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

for i in range(n):
    order = input().split()
    if order[0] == 'insert':
        d[order[1]] = i
    else:
        if order[1] in d:
            print("yes")
        else:
            print("no") n = int(input()) n int(input()) int input() input d = {} d {} for i in range(n):
    order = input().split()
    if order[0] == 'insert':
        d[order[1]] = i
    else:
        if order[1] in d:
            print("yes")
        else:
            print("no") i range(n) range n order = input().split() order input().split() ().split () input split if order[0] == 'insert':
        d[order[1]] = i
    else:
        if order[1] in d:
            print("yes")
        else:
            print("no") order[0] == 'insert' order[0] order 0 'insert' d[order[1]] = i d[order[1]] d order[1] order 1 i if order[1] in d:
            print("yes")
        else:
            print("no") order[1] in d order[1] order 1 d print("yes") print "yes" print("no") print "no" n = int(input()) int(input()) n order = input().split() input().split() order d = {} {} d
n = int(input())
d = {}

for i in range(n):
    order = input().split()
    if order[0] == 'insert':
        d[order[1]] = i
    else:
        if order[1] in d:
            print("yes")
        else:
            print("no")