commiting inheritance hierarchy of the classes A B C