class Dict(object):
    def __init__(self, size):
        self.dict = [None for _ in range(size)]
        self.size = size

    def h1(self, key):
        return key % self.size

    def h2(self, key):
        return 1 + (key % (self.size-1))

    def h(self, key, i):
        return (self.h1(key) + i * self.h2(key)) % self.size

    def insert(self, key):
        i = 0
        while True:
            j = self.h(key, i)
            if self.dict[j] == None:
                self.dict[j] = key
                break
            else:
                i += 1

    def find(self, key):
        i = 0
        while True:
            j = self.h(key, i)
            if self.dict[j] == key:
                return 1
            elif self.dict[j] == None or i >= self.size:
                return 0
            else:
                i += 1


def get_key(table, word):
    return int(word.translate(table))


if __name__ == "__main__":
    import sys
    input = sys.stdin.readline # faster input

    table = str.maketrans({
        "A": "1",
        "C": "2",
        "G": "3",
        "T": "4"
    })

    m = 1046527
    d = Dict(m)

    n = int(input())

    for _ in range(n):
        command = input()
        if command[0] == 'i':
            d.insert(get_key(table, command[7:]))
        else:
            if d.find(get_key(table, command[5:])):
                print('yes')
            else:
                print('no')
 class Dict(object):
    def __init__(self, size):
        self.dict = [None for _ in range(size)]
        self.size = size

    def h1(self, key):
        return key % self.size

    def h2(self, key):
        return 1 + (key % (self.size-1))

    def h(self, key, i):
        return (self.h1(key) + i * self.h2(key)) % self.size

    def insert(self, key):
        i = 0
        while True:
            j = self.h(key, i)
            if self.dict[j] == None:
                self.dict[j] = key
                break
            else:
                i += 1

    def find(self, key):
        i = 0
        while True:
            j = self.h(key, i)
            if self.dict[j] == key:
                return 1
            elif self.dict[j] == None or i >= self.size:
                return 0
            else:
                i += 1 Dict def __init__(self, size):
        self.dict = [None for _ in range(size)]
        self.size = size

     __init__ None for _ in range(size) for _ in range(size) _ range(size) range size for _ in range(size) None self.dict = [None for _ in range(size)] self.dict self dict [None for _ in range(size)] self.size = size self.size self size size self self size size def h1(self, key):
        return key % self.size

     h1 return key % self.size key % self.size key self.size self size self self key key def h2(self, key):
        return 1 + (key % (self.size-1))

     h2 return 1 + (key % (self.size-1)) 1 + (key % (self.size-1)) 1 key % (self.size-1) key self.size-1 self.size self size 1 self self key key def h(self, key, i):
        return (self.h1(key) + i * self.h2(key)) % self.size

     h return (self.h1(key) + i * self.h2(key)) % self.size (self.h1(key) + i * self.h2(key)) % self.size self.h1(key) + i * self.h2(key) self.h1(key) self.h1 self h1 key i * self.h2(key) i self.h2(key) self.h2 self h2 key self.size self size self self key key i i def insert(self, key):
        i = 0
        while True:
            j = self.h(key, i)
            if self.dict[j] == None:
                self.dict[j] = key
                break
            else:
                i += 1

     insert i = 0 i 0 while True:
            j = self.h(key, i)
            if self.dict[j] == None:
                self.dict[j] = key
                break
            else:
                i += 1

     True j = self.h(key, i) j self.h(key, i) self.h self h key i if self.dict[j] == None:
                self.dict[j] = key
                break
            else:
                i += 1

     self.dict[j] == None self.dict[j] self.dict self dict j None self.dict[j] = key self.dict[j] self.dict self dict j key break i += 1 i 1 self self key key def find(self, key):
        i = 0
        while True:
            j = self.h(key, i)
            if self.dict[j] == key:
                return 1
            elif self.dict[j] == None or i >= self.size:
                return 0
            else:
                i += 1 find i = 0 i 0 while True:
            j = self.h(key, i)
            if self.dict[j] == key:
                return 1
            elif self.dict[j] == None or i >= self.size:
                return 0
            else:
                i += 1 True j = self.h(key, i) j self.h(key, i) self.h self h key i if self.dict[j] == key:
                return 1
            elif self.dict[j] == None or i >= self.size:
                return 0
            else:
                i += 1 self.dict[j] == key self.dict[j] self.dict self dict j key return 1 1 elif self.dict[j] == None or i >= self.size:
                return 0
             self.dict[j] == None or i >= self.size self.dict[j] == None self.dict[j] self.dict self dict j None i >= self.size i self.size self size return 0 0 i += 1 i 1 self self key key object def get_key(table, word):
    return int(word.translate(table)) get_key return int(word.translate(table)) int(word.translate(table)) int word.translate(table) word.translate word translate table table table word word if __name__ == "__main__":
    import sys
    input = sys.stdin.readline # faster input

    table = str.maketrans({
        "A": "1",
        "C": "2",
        "G": "3",
        "T": "4"
    })

    m = 1046527
    d = Dict(m)

    n = int(input())

    for _ in range(n):
        command = input()
        if command[0] == 'i':
            d.insert(get_key(table, command[7:]))
        else:
            if d.find(get_key(table, command[5:])):
                print('yes')
            else:
                print('no') __name__ == "__main__" __name__ "__main__" import sys sys input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline table = str.maketrans({
        "A": "1",
        "C": "2",
        "G": "3",
        "T": "4"
    }) table str.maketrans({
        "A": "1",
        "C": "2",
        "G": "3",
        "T": "4"
    }) str.maketrans str maketrans {
        "A": "1",
        "C": "2",
        "G": "3",
        "T": "4"
    } "A" "A" "1" "C" "C" "2" "G" "G" "3" "T" "T" "4" m = 1046527 m 1046527 d = Dict(m) d Dict(m) Dict m n = int(input()) n int(input()) int input() input for _ in range(n):
        command = input()
        if command[0] == 'i':
            d.insert(get_key(table, command[7:]))
        else:
            if d.find(get_key(table, command[5:])):
                print('yes')
            else:
                print('no') _ range(n) range n command = input() command input() input if command[0] == 'i':
            d.insert(get_key(table, command[7:]))
        else:
            if d.find(get_key(table, command[5:])):
                print('yes')
            else:
                print('no') command[0] == 'i' command[0] command 0 'i' d.insert(get_key(table, command[7:])) d.insert d insert get_key(table, command[7:]) get_key table command[7:] command 7: 7 if d.find(get_key(table, command[5:])):
                print('yes')
            else:
                print('no') d.find(get_key(table, command[5:])) d.find d find get_key(table, command[5:]) get_key table command[5:] command 5: 5 print('yes') print 'yes' print('no') print 'no' n = int(input()) int(input()) n def get_key(table, word):
    return int(word.translate(table)) def get_key(table, word):
    return int(word.translate(table)) get_key class Dict(object):
    def __init__(self, size):
        self.dict = [None for _ in range(size)]
        self.size = size

    def h1(self, key):
        return key % self.size

    def h2(self, key):
        return 1 + (key % (self.size-1))

    def h(self, key, i):
        return (self.h1(key) + i * self.h2(key)) % self.size

    def insert(self, key):
        i = 0
        while True:
            j = self.h(key, i)
            if self.dict[j] == None:
                self.dict[j] = key
                break
            else:
                i += 1

    def find(self, key):
        i = 0
        while True:
            j = self.h(key, i)
            if self.dict[j] == key:
                return 1
            elif self.dict[j] == None or i >= self.size:
                return 0
            else:
                i += 1 class Dict(object):
    def __init__(self, size):
        self.dict = [None for _ in range(size)]
        self.size = size

    def h1(self, key):
        return key % self.size

    def h2(self, key):
        return 1 + (key % (self.size-1))

    def h(self, key, i):
        return (self.h1(key) + i * self.h2(key)) % self.size

    def insert(self, key):
        i = 0
        while True:
            j = self.h(key, i)
            if self.dict[j] == None:
                self.dict[j] = key
                break
            else:
                i += 1

    def find(self, key):
        i = 0
        while True:
            j = self.h(key, i)
            if self.dict[j] == key:
                return 1
            elif self.dict[j] == None or i >= self.size:
                return 0
            else:
                i += 1 Dict command = input() input() command input = sys.stdin.readline sys.stdin.readline input d = Dict(m) Dict(m) d table = str.maketrans({
        "A": "1",
        "C": "2",
        "G": "3",
        "T": "4"
    }) str.maketrans({
        "A": "1",
        "C": "2",
        "G": "3",
        "T": "4"
    }) table m = 1046527 1046527 m
class Dict(object):
    def __init__(self, size):
        self.dict = [None for _ in range(size)]
        self.size = size

    def h1(self, key):
        return key % self.size

    def h2(self, key):
        return 1 + (key % (self.size-1))

    def h(self, key, i):
        return (self.h1(key) + i * self.h2(key)) % self.size

    def insert(self, key):
        i = 0
        while True:
            j = self.h(key, i)
            if self.dict[j] == None:
                self.dict[j] = key
                break
            else:
                i += 1

    def find(self, key):
        i = 0
        while True:
            j = self.h(key, i)
            if self.dict[j] == key:
                return 1
            elif self.dict[j] == None or i >= self.size:
                return 0
            else:
                i += 1


def get_key(table, word):
    return int(word.translate(table))


if __name__ == "__main__":
    import sys
    input = sys.stdin.readline # faster input

    table = str.maketrans({
        "A": "1",
        "C": "2",
        "G": "3",
        "T": "4"
    })

    m = 1046527
    d = Dict(m)

    n = int(input())

    for _ in range(n):
        command = input()
        if command[0] == 'i':
            d.insert(get_key(table, command[7:]))
        else:
            if d.find(get_key(table, command[5:])):
                print('yes')
            else:
                print('no')

