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