interface A { override fun toString() = "A" } abstract class B : A class C : B() { override fun toString() = "B" }