import contextlib

class Open:
    def __enter__(self):
        return None
    def __exit__(self, exc_type, exc_val, exc_tb):
        pass


class Pituh:
    def kok(self):
    	print("kok")
    	
@contextlib.contextmanager
def get_complex_pituh():
	with Open():
		yield Pituh()
	

@contextlib.contextmanager
def get_pituhs():
    with contextlib.ExitStack() as s:
        yield [s.enter_context(get_complex_pituh())]


with get_pituhs() as pituhs:
    kok = pituhs[0]
    print(type(kok))
    kok.kok()