

n = int(input())
d = set()
for _ in range(n):
    cmd, data = input().split()
    if cmd == 'insert':
        d.add(data)
    else:
        if data in d:
            print("yes")
        else:
            print("no") n = int(input()) n int(input()) int input() input d = set() d set() set for _ in range(n):
    cmd, data = input().split()
    if cmd == 'insert':
        d.add(data)
    else:
        if data in d:
            print("yes")
        else:
            print("no") _ range(n) range n cmd, data = input().split() cmd input().split() ().split () input split data if cmd == 'insert':
        d.add(data)
    else:
        if data in d:
            print("yes")
        else:
            print("no") cmd == 'insert' cmd 'insert' d.add(data) d.add d add data if data in d:
            print("yes")
        else:
            print("no") data in d data d print("yes") print "yes" print("no") print "no" d = set() set() d n = int(input()) int(input()) n cmd, data = input().split() input().split() cmd data = input().split() input().split() data


n = int(input())
d = set()
for _ in range(n):
    cmd, data = input().split()
    if cmd == 'insert':
        d.add(data)
    else:
        if data in d:
            print("yes")
        else:
            print("no")
