Output binary tree by depth