using System;
interface A { void Foo(); }
interface B { void Foo(); }
interface C { void Foo(); }
class D : A, B, C {
public void Foo() { Console.WriteLine("pub fn"); }
void A.Foo() { Console.WriteLine("spec fun A"); }
void B.Foo() { Console.WriteLine("spec fun B"); }
}
public class Test
{
public static void Main()
{
var c = new D();
c.Foo();
((A)c).Foo();
((B)c).Foo();
((C)c).Foo();
}
}
dXNpbmcgU3lzdGVtOwoKaW50ZXJmYWNlIEEgeyB2b2lkIEZvbygpOyB9CmludGVyZmFjZSBCIHsgdm9pZCBGb28oKTsgfQppbnRlcmZhY2UgQyB7IHZvaWQgRm9vKCk7IH0KCmNsYXNzIEQgOiBBLCBCLCBDIHsgCglwdWJsaWMgdm9pZCBGb28oKSB7IENvbnNvbGUuV3JpdGVMaW5lKCJwdWIgZm4iKTsgfSAgCgl2b2lkIEEuRm9vKCkgeyBDb25zb2xlLldyaXRlTGluZSgic3BlYyBmdW4gQSIpOyB9Cgl2b2lkIEIuRm9vKCkgeyBDb25zb2xlLldyaXRlTGluZSgic3BlYyBmdW4gQiIpOyB9Cn0KCnB1YmxpYyBjbGFzcyBUZXN0CnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBNYWluKCkKCXsKCQl2YXIgYyA9IG5ldyBEKCk7CgkJYy5Gb28oKTsKCQkoKEEpYykuRm9vKCk7CgkJKChCKWMpLkZvbygpOwoJCSgoQyljKS5Gb28oKTsKCX0KfQ==