print tree by level