Why is the second output not 2 2 2 and the third output not 3 3 3? What is the reason behind such output?
class A(object):
val = 1
class B(A):
pass
class C(A):
pass
print (A.val, B.val, C.val)
B.val = 2
print (A.val, B.val, C.val)
A.val = 3
print (A.val, B.val, C.val)