String str = "mama car tonic";
System.out.println(str.substring(2,4) +
                   str.substring(5,8) +
		   str.substring(10,13));