n = int(input())

s = set()
for _ in range(n):
    inst = input().split()
    if inst[0] == "insert":
        s.add(inst[1])
    else:
        if inst[1] in s:
            print("yes")
        else:
            print("no") n = int(input()) n int(input()) int input() input s = set() s set() set for _ in range(n):
    inst = input().split()
    if inst[0] == "insert":
        s.add(inst[1])
    else:
        if inst[1] in s:
            print("yes")
        else:
            print("no") _ range(n) range n inst = input().split() inst input().split() ().split () input split if inst[0] == "insert":
        s.add(inst[1])
    else:
        if inst[1] in s:
            print("yes")
        else:
            print("no") inst[0] == "insert" inst[0] inst 0 "insert" s.add(inst[1]) s.add s add inst[1] inst 1 if inst[1] in s:
            print("yes")
        else:
            print("no") inst[1] in s inst[1] inst 1 s print("yes") print "yes" print("no") print "no" s = set() set() s inst = input().split() input().split() inst n = int(input()) int(input()) n
n = int(input())

s = set()
for _ in range(n):
    inst = input().split()
    if inst[0] == "insert":
        s.add(inst[1])
    else:
        if inst[1] in s:
            print("yes")
        else:
            print("no")