wrote a code to print a tree vertically