class A: def process(self): return "A" class B(A): def process(self): return f"B -> {super().process()}" class C(A): def process(self): return f"C -> {super().process()}" class D(B, C): def process(self): return f"D -> {super().process()}" obj = D() print(obj.process())