def insert(string, hash_list):
    hali = hash_list
    if string not in hali:
        hali[string] = 1
    return hali


def find(string, hash_list):
    hali = hash_list
    return string in hali



n = int(input())
words = {}
operate = [list(input().split()) for i in range(n)]

for i in operate:
    if i[0] == "insert":
        insert(i[1], words)
    elif i[0] == "find":
        if find(i[1], words):
            print("yes")
        else:
            print("no") def insert(string, hash_list):
    hali = hash_list
    if string not in hali:
        hali[string] = 1
    return hali insert hali = hash_list hali hash_list if string not in hali:
        hali[string] = 1
     string not in hali string hali hali[string] = 1 hali[string] hali string 1 return hali hali string string hash_list hash_list def find(string, hash_list):
    hali = hash_list
    return string in hali find hali = hash_list hali hash_list return string in hali string in hali string hali string string hash_list hash_list n = int(input()) n int(input()) int input() input words = {} words {} list(input().split()) for i in range(n) for i in range(n) i range(n) range n for i in range(n) list(input().split()) list input().split() ().split () input split operate = [list(input().split()) for i in range(n)] operate [list(input().split()) for i in range(n)] for i in operate:
    if i[0] == "insert":
        insert(i[1], words)
    elif i[0] == "find":
        if find(i[1], words):
            print("yes")
        else:
            print("no") i operate if i[0] == "insert":
        insert(i[1], words)
    elif i[0] == "find":
        if find(i[1], words):
            print("yes")
        else:
            print("no") i[0] == "insert" i[0] i 0 "insert" insert(i[1], words) insert i[1] i 1 words elif i[0] == "find":
        if find(i[1], words):
            print("yes")
        else:
            print("no") i[0] == "find" i[0] i 0 "find" if find(i[1], words):
            print("yes")
        else:
            print("no") find(i[1], words) find i[1] i 1 words print("yes") print "yes" print("no") print "no" operate = [list(input().split()) for i in range(n)] [list(input().split()) for i in range(n)] operate def find(string, hash_list):
    hali = hash_list
    return string in hali def find(string, hash_list):
    hali = hash_list
    return string in hali find n = int(input()) int(input()) n def insert(string, hash_list):
    hali = hash_list
    if string not in hali:
        hali[string] = 1
    return hali def insert(string, hash_list):
    hali = hash_list
    if string not in hali:
        hali[string] = 1
    return hali insert words = {} {} words
def insert(string, hash_list):
    hali = hash_list
    if string not in hali:
        hali[string] = 1
    return hali


def find(string, hash_list):
    hali = hash_list
    return string in hali



n = int(input())
words = {}
operate = [list(input().split()) for i in range(n)]

for i in operate:
    if i[0] == "insert":
        insert(i[1], words)
    elif i[0] == "find":
        if find(i[1], words):
            print("yes")
        else:
            print("no")