d = {}
n = int(input())
for _ in range(n):
    a, b = input().split()
    if a == 'insert':
        d[b] = b
    elif a == 'find':
        print('yes' if b in d.keys() else 'no') d = {} d {} n = int(input()) n int(input()) int input() input for _ in range(n):
    a, b = input().split()
    if a == 'insert':
        d[b] = b
    elif a == 'find':
        print('yes' if b in d.keys() else 'no') _ range(n) range n a, b = input().split() a input().split() ().split () input split b if a == 'insert':
        d[b] = b
    elif a == 'find':
        print('yes' if b in d.keys() else 'no') a == 'insert' a 'insert' d[b] = b d[b] d b b elif a == 'find':
        print('yes' if b in d.keys() else 'no') a == 'find' a 'find' print('yes' if b in d.keys() else 'no') print 'yes' if b in d.keys() else 'no' b in d.keys() b d.keys() d.keys d keys 'yes' 'no' n = int(input()) int(input()) n d = {} {} d a, b = input().split() input().split() a b = input().split() input().split() b
d = {}
n = int(input())
for _ in range(n):
    a, b = input().split()
    if a == 'insert':
        d[b] = b
    elif a == 'find':
        print('yes' if b in d.keys() else 'no')
