class Dictionary:
    def __init__(self):
        self.elements = set()
    def insert(self, x):
        self.elements.add(x)
    def find(self, y):
        if y in self.elements:
            print('yes')
        else:
            print('no')

import sys

n = int(sys.stdin.readline())

simple_dict = Dictionary()

for i in range(n):
    operation = sys.stdin.readline()
    if operation[0] == 'i':
        simple_dict.insert(operation[7:])
    else:
        simple_dict.find(operation[5:]) class Dictionary:
    def __init__(self):
        self.elements = set()
    def insert(self, x):
        self.elements.add(x)
    def find(self, y):
        if y in self.elements:
            print('yes')
        else:
            print('no') Dictionary def __init__(self):
        self.elements = set()
     __init__ self.elements = set() self.elements self elements set() set self self def insert(self, x):
        self.elements.add(x)
     insert self.elements.add(x) self.elements.add self.elements self elements add x self self x x def find(self, y):
        if y in self.elements:
            print('yes')
        else:
            print('no') find if y in self.elements:
            print('yes')
        else:
            print('no') y in self.elements y self.elements self elements print('yes') print 'yes' print('no') print 'no' self self y y import sys sys n = int(sys.stdin.readline()) n int(sys.stdin.readline()) int sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline simple_dict = Dictionary() simple_dict Dictionary() Dictionary for i in range(n):
    operation = sys.stdin.readline()
    if operation[0] == 'i':
        simple_dict.insert(operation[7:])
    else:
        simple_dict.find(operation[5:]) i range(n) range n operation = sys.stdin.readline() operation sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline if operation[0] == 'i':
        simple_dict.insert(operation[7:])
    else:
        simple_dict.find(operation[5:]) operation[0] == 'i' operation[0] operation 0 'i' simple_dict.insert(operation[7:]) simple_dict.insert simple_dict insert operation[7:] operation 7: 7 simple_dict.find(operation[5:]) simple_dict.find simple_dict find operation[5:] operation 5: 5 simple_dict = Dictionary() Dictionary() simple_dict n = int(sys.stdin.readline()) int(sys.stdin.readline()) n operation = sys.stdin.readline() sys.stdin.readline() operation class Dictionary:
    def __init__(self):
        self.elements = set()
    def insert(self, x):
        self.elements.add(x)
    def find(self, y):
        if y in self.elements:
            print('yes')
        else:
            print('no') class Dictionary:
    def __init__(self):
        self.elements = set()
    def insert(self, x):
        self.elements.add(x)
    def find(self, y):
        if y in self.elements:
            print('yes')
        else:
            print('no') Dictionary
class Dictionary:
    def __init__(self):
        self.elements = set()
    def insert(self, x):
        self.elements.add(x)
    def find(self, y):
        if y in self.elements:
            print('yes')
        else:
            print('no')

import sys

n = int(sys.stdin.readline())

simple_dict = Dictionary()

for i in range(n):
    operation = sys.stdin.readline()
    if operation[0] == 'i':
        simple_dict.insert(operation[7:])
    else:
        simple_dict.find(operation[5:])