class A:
__x = 1
def f(self):
return "f from A"
def g(self):
return "g from A"
class B:
__x = 2
def f(self):
return "f from B"
def g(self):
return "g from B"
class C(A, B):
f = B.f
c = C()
print(c.f(), c.g(), c._A__x, c._B__x)