if ( ..A... ) { if ( ..B.. ) { if ( ..C.. ) { if ( ..D.. ) { print ..... } else { print ... } } else { if ( .. D2.. ) { ... you get the idea ...