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

for i in range(n):
    line = input().split()
    if line[0] == 'insert':
        if dic.get(line[1]):
            dic[line[1]] += 1
        else:
            dic[line[1]] = 1
    elif line[0] == 'find':
        if dic.get(line[1]):
            print('yes')
        else:
            print('no') n = int(input()) n int(input()) int input() input dic = {} dic {} for i in range(n):
    line = input().split()
    if line[0] == 'insert':
        if dic.get(line[1]):
            dic[line[1]] += 1
        else:
            dic[line[1]] = 1
    elif line[0] == 'find':
        if dic.get(line[1]):
            print('yes')
        else:
            print('no') i range(n) range n line = input().split() line input().split() ().split () input split if line[0] == 'insert':
        if dic.get(line[1]):
            dic[line[1]] += 1
        else:
            dic[line[1]] = 1
    elif line[0] == 'find':
        if dic.get(line[1]):
            print('yes')
        else:
            print('no') line[0] == 'insert' line[0] line 0 'insert' if dic.get(line[1]):
            dic[line[1]] += 1
        else:
            dic[line[1]] = 1
     dic.get(line[1]) dic.get dic get line[1] line 1 dic[line[1]] += 1 dic[line[1]] dic line[1] line 1 1 dic[line[1]] = 1 dic[line[1]] dic line[1] line 1 1 elif line[0] == 'find':
        if dic.get(line[1]):
            print('yes')
        else:
            print('no') line[0] == 'find' line[0] line 0 'find' if dic.get(line[1]):
            print('yes')
        else:
            print('no') dic.get(line[1]) dic.get dic get line[1] line 1 print('yes') print 'yes' print('no') print 'no' line = input().split() input().split() line n = int(input()) int(input()) n dic = {} {} dic
n = int(input())
dic = {}

for i in range(n):
    line = input().split()
    if line[0] == 'insert':
        if dic.get(line[1]):
            dic[line[1]] += 1
        else:
            dic[line[1]] = 1
    elif line[0] == 'find':
        if dic.get(line[1]):
            print('yes')
        else:
            print('no')