Microsoft Interview Question

How to output a tree in column sequence from left to right.