class A extends bar extends foo {} class B extends bar, foo {} class C implements B {}