Amazon interview question

print vertically the binary tree