A higher resolution is required to access the IDE

- 29

## Learning Opportunities

This puzzle can be solved using the following concepts. Practice using these concepts and improve your skills.

## Statement

## Goal

We as programmers know about the binary, which machine understands. A Binary combination of 0 and 1 for**n**bits holds 2

**ⁿ**combinations. For example, 3-bit combinations will be:

Now, what if the bits change? It would still be a binary or a duo combination of the symbols used. To get over the usual 0-1 as digits or symbols, let's attempt using several distinct special character symbols for the sake of modification. With various symbols provided, use every character in place of

As a quick clarification, refer to the following examples:

- If characters are

- If characters are

- If characters are

**0**with

**1**, followed by

**0**with

**1**and then

**0**with

**1**.

and so on ...

Note: In case you just receive a single character, just use the same character instead of empty output.

Given some distinct symbols as input, try to output all the unique combinations of all the two adjacent symbols as bits. Feel free to make use of any binary sequences generation techniques or come up with your own edition to match the order of desired output.

Input

**Line 1**contains an integer

`total`

**Next**contain one

`total`lines`character`symbol to be used as a bit with its adjacent symbols.

Output

Various possible combinations with each combination in a separate line, having same length as the total number of given symbols, and formed with characters in adjacent rows of a given symbol.

Constraints

`character`symbols belong to {

1 <

`total`count of symbols (per testcase) < 10

Example

Input

2 * #

Output

** *# #* ##

A higher resolution is required to access the IDE