Java program to print all paths from the root to the leaf