Back

Skyline

Worth 5 point(s) - Runtime Limit: 1 seconds

Introduction

There are few things as charming as the serene view of skyscrapers forming a city skyline in the wintertime. Write a program to display one such skyline!

Input

The first line of input will contain an integer T denoting the number of test cases to follow. For each test case, there will be a single line that will begin with an integer S, the number of skyscrapers in the skyline. Then there will be S space separated integers to follow, each of these giving the story height of its respective skyscraper in order from left to right.

2
4 3 6 5 2
5 7 4 2 3 5

Output

For each test case, output an ascii skyline as depicted below. Separate each new skyline with a blank line.

    _       
   |#| _    
   |#||#|   
 _ |#||#|   
|#||#||#| _ 
|#||#||#||#|
|#||#||#||#|

 _             
|#|            
|#|          _ 
|#| _       |#|
|#||#|    _ |#|
|#||#| _ |#||#|
|#||#||#||#||#|
|#||#||#||#||#|