a = int(input())

d = {}
for i in range(a):
    o,v = input().split()
    if o == 'insert':
        d[v] = v
    elif o == 'find':
        if v in d:
            print('yes')
        else:
            print('no')
 a = int(input()) a int(input()) int input() input d = {} d {} for i in range(a):
    o,v = input().split()
    if o == 'insert':
        d[v] = v
    elif o == 'find':
        if v in d:
            print('yes')
        else:
            print('no') i range(a) range a o,v = input().split() o input().split() ().split () input split v if o == 'insert':
        d[v] = v
    elif o == 'find':
        if v in d:
            print('yes')
        else:
            print('no') o == 'insert' o 'insert' d[v] = v d[v] d v v elif o == 'find':
        if v in d:
            print('yes')
        else:
            print('no') o == 'find' o 'find' if v in d:
            print('yes')
        else:
            print('no') v in d v d print('yes') print 'yes' print('no') print 'no' d = {} {} d o,v = input().split() input().split() o a = int(input()) int(input()) a v = input().split() input().split() v
a = int(input())

d = {}
for i in range(a):
    o,v = input().split()
    if o == 'insert':
        d[v] = v
    elif o == 'find':
        if v in d:
            print('yes')
        else:
            print('no')

