LearnPy Hub
← Inheritance & Special Methods problems
Medium

Which Method Runs?

Class A has who() returning 'A'. B(A) overrides it to return 'B' + super().who(). C(B) overrides it to return 'C' + super().who(). Read a class name and print who() for an instance.

Input

A, B or C.

Output

A string.

Sample 1

Input
A
Output
A

Sample 2

Input
B
Output
BA
solution.py
Output appears here
Which Method Runs? · Python practice problem · LearnPy Hub