Cantor Set

Time limit1sMemory limit128 MB

Problem

The Cantor set is a set of real numbers between 0 and 1. It is built by starting with the interval $[0, 1]$, dividing each interval into three equal parts, and repeatedly removing the middle part.

Assume the whole set is finite, and let us build an approximation of the Cantor set through the following process.

  1. Start with a string made of $3^N$ dashes (-).
  2. Divide the string into three equal parts and replace the middle part with spaces. This leaves two lines (strings).
  3. Divide each remaining line into three equal parts and replace the middle part with spaces. Repeat this process until every line has length 1.

For example, when $N = 3$, we start with a string of length 27.

---------------------------

Replace the middle part with spaces.

---------         ---------

Replace the middle part of each of the two remaining lines with spaces.

---   ---         ---   ---

Once more.

- -   - -         - -   - -

Stop when every line has length 1. Given $N$, write a program that prints the result after the final step.

Input

The input consists of several lines. Each line contains one integer $N$. Input ends at end of file (EOF). $N$ is an integer with $0 \le N \le 12$.

Output

For each $N$ given in the input, print the corresponding approximation of the Cantor set, one per line.