print tree from top to bottom layer by layer