Write a program that reads a binary tree of words, and that prints it following the format of the sample.
Input
Input consists of the description of a tree, which is a preorder traversal of its words, marking the empty trees with ‘-1’- You can assume that the given words have less than ten letters.
Output
Your program must print the tree following the format of the sample. Notice that each level of the tree is printed using ten characters.
Input
va tenir sis -1 polls -1 -1 xics -1 -1 pics pellarics -1 -1 camatorts i -1 becarics -1 -1 -1
Output
camatorts becarics i pics pellarics va xics tenir polls sis