| f | class ExceptionTree: | f | class ExceptionTree: | 
             |  |  |  | 
             |     def __init__(self): |  |     def __init__(self): | 
            | n |         self.exceptions = {1: type('Exception-1', (Exception,), {'n': 1} | n |         self.cache = {1: type('Exception-1', (Exception,), {'n': 1})} | 
             | )} |  |   | 
             |  |  |  | 
             |     def __call__(self, index): |  |     def __call__(self, index): | 
            | n |         if index in self.exceptions: | n |         if index in self.cache: | 
             |             return self.exceptions[index] |  |             return self.cache[index] | 
             |         parent_index = index // 2 |  |         parent_index = index // 2 | 
             |         parent_exception = self(parent_index) |  |         parent_exception = self(parent_index) | 
            | t |         exception_class = type(f'Exception-{index}', (parent_exception,) | t |         new_exception = type(f'Exception-{index}', (parent_exception,),  | 
             | , {'n': index}) |  | {'n': index}) | 
             |         self.exceptions[index] = exception_class |  |         self.cache[index] = new_exception | 
             |         return exception_class |  |         return new_exception |