Submit solution


Points: 1
Time limit: 2.0s
Memory limit: 256M

Problem types

You are the king of a rich and beautiful kingdom, which can be described as a square with a side of exactly \(100\) kilometers divided by small square pieces \(1 \times 1\) kilometer. There are \(N\) knights in the kingdom and all of them want some land-- the \(i^{th}\) knight wants exactly \(a_i\) pieces of land. You are wise enough to give them desired land to avoid rebellion.

Now you want to decide which squares should belong to which knight. However, every knight must be able to travel between any two pieces of his land without visiting any other piece which doesn't belong to him. As you may have already guessed, knights in the kingdom respect chess rules and move only according to them (i.e. in one turn a knight can move \(2\) kilometers in a horizontal direction and \(1\) in a vertical or vice versa). All the land which will not belong to any knight you will leave to yourself.

One more problem is that all knights are in constant war with each other! To avoid a direct fight between the vassals, you decided that the land must be divided between knights in such a way, that it is impossible to move from one knight's land to another knight's land in a single knight's turn.

You have to choose pieces of land that you will keep for yourself in such a way that it's possible to divide all the other pieces between the knights following all the described rules.

Input

In the first line, there is one integer \(N\)-- the number of knights in the kingdom. In the second line, there are \(n\) space-separated integers-- the area of land each knight wants in their possession.

  • \(1 \le N \le 1000\)

  • \(1 \le a_i \le 1000\)

  • \(1 \le \sum_{i=1}^{n} a_i \le 1000\)

Output

Output exactly \(100\) lines, each with exactly \(100\) characters. If you want to leave some piece of land in your possession, the corresponding character should equal #, and it should equal . otherwise.

Example

Input 1:

2
1 3

Output 1:

#.###
#..##
.####
#####
#####

Explanation

Input 1: Only the top left \(5x5\) square of the kingdom is shown (all the rest of the land will be yours). However, you must output the full map of the kingdom as well.

After such a division, you can then assign a piece in the \(2^{nd}\) column of the \(2^{nd}\) row to the first knight, and three of the rest of the pieces to the second one.