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

for i in range(n):
    op, st = input().split()
    if op == 'insert':
        h[st] = 'yes'
    else:
        print (h.get(st, 'no')) n = int(input()) n int(input()) int input() input h = {} h {} for i in range(n):
    op, st = input().split()
    if op == 'insert':
        h[st] = 'yes'
    else:
        print (h.get(st, 'no')) i range(n) range n op, st = input().split() op input().split() ().split () input split st if op == 'insert':
        h[st] = 'yes'
    else:
        print (h.get(st, 'no')) op == 'insert' op 'insert' h[st] = 'yes' h[st] h st 'yes' print (h.get(st, 'no')) print h.get(st, 'no') h.get h get st 'no' op, st = input().split() input().split() op h = {} {} h st = input().split() input().split() st n = int(input()) int(input()) n
n = int(input())
h = {}

for i in range(n):
    op, st = input().split()
    if op == 'insert':
        h[st] = 'yes'
    else:
        print (h.get(st, 'no'))