n = int(input())
data = {}
for _ in range(n):
    key = input()
    if key[0] == 'i':
        data.setdefault(key[7:], '0')
    else:
        if key[5:] in data:
            print('yes')
        else:
            print('no') n = int(input()) n int(input()) int input() input data = {} data {} for _ in range(n):
    key = input()
    if key[0] == 'i':
        data.setdefault(key[7:], '0')
    else:
        if key[5:] in data:
            print('yes')
        else:
            print('no') _ range(n) range n key = input() key input() input if key[0] == 'i':
        data.setdefault(key[7:], '0')
    else:
        if key[5:] in data:
            print('yes')
        else:
            print('no') key[0] == 'i' key[0] key 0 'i' data.setdefault(key[7:], '0') data.setdefault data setdefault key[7:] key 7: 7 '0' if key[5:] in data:
            print('yes')
        else:
            print('no') key[5:] in data key[5:] key 5: 5 data print('yes') print 'yes' print('no') print 'no' n = int(input()) int(input()) n key = input() input() key data = {} {} data
n = int(input())
data = {}
for _ in range(n):
    key = input()
    if key[0] == 'i':
        data.setdefault(key[7:], '0')
    else:
        if key[5:] in data:
            print('yes')
        else:
            print('no')
