public class MainClass { MainClass() { } MainClass(MainClass m) { m1 = m; } MainClass m1; public static void main(String[] args) { MainClass m2 = new MainClass(); MainClass m3 = new MainClass(m2); m3.go(); MainClass m4 = m3.m1; m4.go(); MainClass m5 = m2.m1; m5.go(); } void go() { System.out.print("hi "); } }