print tree in zig-zag order