Solution (source code)

= Solution

The output is \b[`ABC`], without a newline. The relevant <Scala trait linearization> is `D,C,B,A`. Calling `d.m` starts with `C.m`, whose `super.m` continues to `B.m`, then to `A.m`. The latter prints `A`; returning through the two method bodies then prints `B` followed by `C`. The braces keep each final `print` inside that <object method>.