cryptic tree program in java