n = int(input())

dic = {}
for i in range(n):
    inst, c = input().split()
    if inst[0] == 'i':
        if c in dic:
            dic[c] += 1
        else:
            dic[c] = 0
    else:
        if c in dic:
            print('yes')
        else:
            print('no') n = int(input()) n int(input()) int input() input dic = {} dic {} for i in range(n):
    inst, c = input().split()
    if inst[0] == 'i':
        if c in dic:
            dic[c] += 1
        else:
            dic[c] = 0
    else:
        if c in dic:
            print('yes')
        else:
            print('no') i range(n) range n inst, c = input().split() inst input().split() ().split () input split c if inst[0] == 'i':
        if c in dic:
            dic[c] += 1
        else:
            dic[c] = 0
    else:
        if c in dic:
            print('yes')
        else:
            print('no') inst[0] == 'i' inst[0] inst 0 'i' if c in dic:
            dic[c] += 1
        else:
            dic[c] = 0
     c in dic c dic dic[c] += 1 dic[c] dic c 1 dic[c] = 0 dic[c] dic c 0 if c in dic:
            print('yes')
        else:
            print('no') c in dic c dic print('yes') print 'yes' print('no') print 'no' c = input().split() input().split() c dic = {} {} dic inst, c = input().split() input().split() inst n = int(input()) int(input()) n
n = int(input())

dic = {}
for i in range(n):
    inst, c = input().split()
    if inst[0] == 'i':
        if c in dic:
            dic[c] += 1
        else:
            dic[c] = 0
    else:
        if c in dic:
            print('yes')
        else:
            print('no')