Recursive Tree Building and Printing