public class Solmetest3{ public static void main(String[] argumendid){ Solm s1=new Solm(); Solm s2=new Solm(); Solm s3=new Solm(); Solm s4=new Solm(); Solm s5=new Solm(); Solm s6=new Solm(); s1.sisu=4; s2.sisu=3; s3.sisu=8; s4.sisu=5; s5.sisu=7; s6.sisu=10; s1.vasak=s2; s1.parem=s3; s2.vasak=s4; s3.vasak=s5; s3.parem=s6; System.out.println( s1.sisu+" "+s1.vasak.sisu+" "+s1.vasak.vasak.sisu+" "+ s1.parem.sisu+" "+s1.parem.vasak.sisu+" "+s1.parem.parem.sisu); } }