Printing a tree

Write a program that reads a binary tree of words, and that prints it following the format of the instance.

Input

Input consists of the description of a tree as is explained at the exercise REREC. You can suppose that the given words have less than ten letters.

Output

Your program must print the tree following the format of the instance. Notice that each level of the tree is printed using ten characters.

Problem information

Author: Unknown
Translator: Carlos Molina

Generation: 2026-01-25T10:23:20.103Z

© Jutge.org, 2006–2026.
https://jutge.org