dict = {}

def insert(word):
    global dict

    dict[word] = 0

def find(word):
    global dict
    if word in dict:
        print('yes')
    else:
        print('no')

def main():
    N = int(input())
    order = [list(input().split()) for _ in range(N)]

    for i in range(N):
        if order[i][0] == 'insert':
            insert(order[i][1])
        elif order[i][0] == 'find':
            find(order[i][1])

main()
 dict = {} dict {} def insert(word):
    global dict

    dict[word] = 0 insert global dict dict[word] = 0 dict[word] dict word 0 word word def find(word):
    global dict
    if word in dict:
        print('yes')
    else:
        print('no') find global dict if word in dict:
        print('yes')
    else:
        print('no') word in dict word dict print('yes') print 'yes' print('no') print 'no' word word def main():
    N = int(input())
    order = [list(input().split()) for _ in range(N)]

    for i in range(N):
        if order[i][0] == 'insert':
            insert(order[i][1])
        elif order[i][0] == 'find':
            find(order[i][1]) main N = int(input()) N int(input()) int input() input list(input().split()) for _ in range(N) for _ in range(N) _ range(N) range N for _ in range(N) list(input().split()) list input().split() ().split () input split order = [list(input().split()) for _ in range(N)] order [list(input().split()) for _ in range(N)] for i in range(N):
        if order[i][0] == 'insert':
            insert(order[i][1])
        elif order[i][0] == 'find':
            find(order[i][1]) i range(N) range N if order[i][0] == 'insert':
            insert(order[i][1])
        elif order[i][0] == 'find':
            find(order[i][1]) order[i][0] == 'insert' order[i][0] [i] order i 0 'insert' insert(order[i][1]) insert order[i][1] [i] order i 1 elif order[i][0] == 'find':
            find(order[i][1]) order[i][0] == 'find' order[i][0] [i] order i 0 'find' find(order[i][1]) find order[i][1] [i] order i 1 main() main def main():
    N = int(input())
    order = [list(input().split()) for _ in range(N)]

    for i in range(N):
        if order[i][0] == 'insert':
            insert(order[i][1])
        elif order[i][0] == 'find':
            find(order[i][1]) def main():
    N = int(input())
    order = [list(input().split()) for _ in range(N)]

    for i in range(N):
        if order[i][0] == 'insert':
            insert(order[i][1])
        elif order[i][0] == 'find':
            find(order[i][1]) main def insert(word):
    global dict

    dict[word] = 0 def insert(word):
    global dict

    dict[word] = 0 insert dict = {} {} dict def find(word):
    global dict
    if word in dict:
        print('yes')
    else:
        print('no') def find(word):
    global dict
    if word in dict:
        print('yes')
    else:
        print('no') find
dict = {}

def insert(word):
    global dict

    dict[word] = 0

def find(word):
    global dict
    if word in dict:
        print('yes')
    else:
        print('no')

def main():
    N = int(input())
    order = [list(input().split()) for _ in range(N)]

    for i in range(N):
        if order[i][0] == 'insert':
            insert(order[i][1])
        elif order[i][0] == 'find':
            find(order[i][1])

main()

