# -*-coding:utf-8 -*-


class A(object):
    def __init__(self):
        print("class A--->enter A")
        print("class A--->leave A")


class B(object):
    def __init__(self):
        print("class B--->enter B")
        print("class B--->leave B")


class C(A):
    def __init__(self):
        print("class C--->enter C")
        super(C, self).__init__()
        print("class C--->leave C")


class D(A):
    def __init__(self):
        print("class D--->enter D")
        super(D, self).__init__()
        print("class D--->leave D")


class E(B, C):
    def __init__(self):
        print("class E--->enter E")
        B.__init__(self)
        C.__init__(self)
        print("class E--->leave E")


class F(E, D):
    def __init__(self):
        print("class F--->enter F")
        E.__init__(self)
        D.__init__(self)
        print("class F--->leave F")


print(F().__class__.__mro__)

"""
class Base(object):
    def __init__(self):
        print("Base created")


class ChildA(Base):
    def __init__(self):
        print("enter ChildA")
        Base.__init__(self)
        print("Leave ChildA")


class ChildB(Base):
    def __init__(self):
        print("enter ChildB")
        super(ChildB, self).__init__()
        print("Leave ChildB")


print(ChildA())
print("#############")
print(ChildB())
"""
