print all paths in a tree