N = int(input())

dic = {}
for i in range(N):
    com, s = input().split()
    if com == 'insert':
        dic[s] = True
    elif com == 'find':
        print('yes' if s in dic else 'no') N = int(input()) N int(input()) int input() input dic = {} dic {} for i in range(N):
    com, s = input().split()
    if com == 'insert':
        dic[s] = True
    elif com == 'find':
        print('yes' if s in dic else 'no') i range(N) range N com, s = input().split() com input().split() ().split () input split s if com == 'insert':
        dic[s] = True
    elif com == 'find':
        print('yes' if s in dic else 'no') com == 'insert' com 'insert' dic[s] = True dic[s] dic s True elif com == 'find':
        print('yes' if s in dic else 'no') com == 'find' com 'find' print('yes' if s in dic else 'no') print 'yes' if s in dic else 'no' s in dic s dic 'yes' 'no' N = int(input()) int(input()) N s = input().split() input().split() s dic = {} {} dic com, s = input().split() input().split() com
N = int(input())

dic = {}
for i in range(N):
    com, s = input().split()
    if com == 'insert':
        dic[s] = True
    elif com == 'find':
        print('yes' if s in dic else 'no')
