You have been hired for the most recent digital imaging company in Imagine Land Valley, and your very first job is to write a rendering program for artificial skylines. A skyline is a drawing of a row of buildings (no more than 40) of variable height (between 1 and 100). Given a number of buildings and the corresponding height, you should draw the skyline using ASCII characters, as the following example shows:
XX XXXXXXX XX X XXXX
XX X XXXXXXX XXX XX XXXX
X XX X XXXXXXX XXX XX XXXX
X XXX X XXXXXXX XXX XX XXXX
The input consists an integer N, specifying the number of buildings, which also denotes the width of the skyline, followed by a sequence of N lines containing, as an integer, the height of each building to be plotted.
The plotting of the skyline, drawn horizontally as show in the example above, using just the character "X" and spaces. The output will consist in L+1 strings, all of length N, and where L is the height of the tallest building. The output represents the skyline as follows: on the bottom (last line), the ground is represented by a string consisting just of "X" characters. On top of it, in each column i there must be a column of Hi characters "X", where Hi is the height of the ith building in the input.