class Dictionary:
    def __init__(self):
        self.data = {}
        
    def insert(self, value:str):
        self.data[value] = True

    def find(self, value:str):
        if value in self.data:
            return 'yes'
        return 'no'

if __name__ == '__main__':
    my_dict = Dictionary()
    n = int(input())
    for _ in range(n):
        comm = list(map(str, input().rstrip().split()))
        if comm[0] == 'insert':
            my_dict.insert(comm[1])
        elif comm[0] == 'find':
            print(my_dict.find(comm[1])) class Dictionary:
    def __init__(self):
        self.data = {}
        
    def insert(self, value:str):
        self.data[value] = True

    def find(self, value:str):
        if value in self.data:
            return 'yes'
        return 'no' Dictionary def __init__(self):
        self.data = {}
        
     __init__ self.data = {} self.data self data {} self self def insert(self, value:str):
        self.data[value] = True

     insert self.data[value] = True self.data[value] self.data self data value True self self value:str value def find(self, value:str):
        if value in self.data:
            return 'yes'
        return 'no' find if value in self.data:
            return 'yes'
         value in self.data value self.data self data return 'yes' 'yes' return 'no' 'no' self self value:str value if __name__ == '__main__':
    my_dict = Dictionary()
    n = int(input())
    for _ in range(n):
        comm = list(map(str, input().rstrip().split()))
        if comm[0] == 'insert':
            my_dict.insert(comm[1])
        elif comm[0] == 'find':
            print(my_dict.find(comm[1])) __name__ == '__main__' __name__ '__main__' my_dict = Dictionary() my_dict Dictionary() Dictionary n = int(input()) n int(input()) int input() input for _ in range(n):
        comm = list(map(str, input().rstrip().split()))
        if comm[0] == 'insert':
            my_dict.insert(comm[1])
        elif comm[0] == 'find':
            print(my_dict.find(comm[1])) _ range(n) range n comm = list(map(str, input().rstrip().split())) comm list(map(str, input().rstrip().split())) list map(str, input().rstrip().split()) map str input().rstrip().split() ().rstrip().split ().rstrip() ().rstrip () input rstrip split if comm[0] == 'insert':
            my_dict.insert(comm[1])
        elif comm[0] == 'find':
            print(my_dict.find(comm[1])) comm[0] == 'insert' comm[0] comm 0 'insert' my_dict.insert(comm[1]) my_dict.insert my_dict insert comm[1] comm 1 elif comm[0] == 'find':
            print(my_dict.find(comm[1])) comm[0] == 'find' comm[0] comm 0 'find' print(my_dict.find(comm[1])) print my_dict.find(comm[1]) my_dict.find my_dict find comm[1] comm 1 class Dictionary:
    def __init__(self):
        self.data = {}
        
    def insert(self, value:str):
        self.data[value] = True

    def find(self, value:str):
        if value in self.data:
            return 'yes'
        return 'no' class Dictionary:
    def __init__(self):
        self.data = {}
        
    def insert(self, value:str):
        self.data[value] = True

    def find(self, value:str):
        if value in self.data:
            return 'yes'
        return 'no' Dictionary n = int(input()) int(input()) n comm = list(map(str, input().rstrip().split())) list(map(str, input().rstrip().split())) comm my_dict = Dictionary() Dictionary() my_dict
class Dictionary:
    def __init__(self):
        self.data = {}
        
    def insert(self, value:str):
        self.data[value] = True

    def find(self, value:str):
        if value in self.data:
            return 'yes'
        return 'no'

if __name__ == '__main__':
    my_dict = Dictionary()
    n = int(input())
    for _ in range(n):
        comm = list(map(str, input().rstrip().split()))
        if comm[0] == 'insert':
            my_dict.insert(comm[1])
        elif comm[0] == 'find':
            print(my_dict.find(comm[1]))
