Codeforces Round 337 (Div. 2)
C
Harmony Analysis
Codeforces
1800
原题
← BD →
翻译中…

The semester is already ending, so Danil made an effort and decided to visit a lesson on harmony analysis to know how does the professor look like, at least. Danil was very bored on this lesson until the teacher gave the group a simple task: find $4$ vectors in $4$-dimensional space, such that every coordinate of every vector is $1$ or $- 1$ and any two vectors are orthogonal. Just as a reminder, two vectors in $*n*$-dimensional space are considered to be orthogonal if and only if their scalar product is equal to zero, that is:

翻译中…

image

翻译中…

.

翻译中…

Danil quickly managed to come up with the solution for this problem and the teacher noticed that the problem can be solved in a more general case for $2^{*k*}$ vectors in $2^{*k*}$-dimensinoal space. When Danil came home, he quickly came up with the solution for this problem. Can you cope with it?

翻译中…

Input

翻译中…

The only line of the input contains a single integer $*k*$ ($0 ≤ *k* ≤ 9$).

翻译中…

Output

翻译中…

Print $2^{*k*}$ lines consisting of $2^{*k*}$ characters each. The $*j*$-th character of the $*i*$-th line must be equal to '$*$' if the $*j*$-th coordinate of the $*i*$-th vector is equal to $- 1$, and must be equal to '$+$' if it's equal to $+ 1$. It's guaranteed that the answer always exists.

翻译中…

If there are many correct answers, print any.

翻译中…

Note

翻译中…

Consider all scalar products in example:

翻译中…
  • Vectors $1$ and $2$: $( + 1)·( + 1) + ( + 1)·( - 1) + ( - 1)·( + 1) + ( - 1)·( - 1) = 0$
  • Vectors $1$ and $3$: $( + 1)·( + 1) + ( + 1)·( + 1) + ( - 1)·( + 1) + ( - 1)·( + 1) = 0$
  • Vectors $1$ and $4$: $( + 1)·( + 1) + ( + 1)·( - 1) + ( - 1)·( - 1) + ( - 1)·( + 1) = 0$
  • Vectors $2$ and $3$: $( + 1)·( + 1) + ( - 1)·( + 1) + ( + 1)·( + 1) + ( - 1)·( + 1) = 0$
  • Vectors $2$ and $4$: $( + 1)·( + 1) + ( - 1)·( - 1) + ( + 1)·( - 1) + ( - 1)·( + 1) = 0$
  • Vectors $3$ and $4$: $( + 1)·( + 1) + ( + 1)·( - 1) + ( + 1)·( - 1) + ( + 1)·( + 1) = 0$
翻译中…

样例

Input #1
2
Output #1
++**
+*+*
++++
+**+
InputCopy OutputCopy
题目信息
题号
610C
时间限制
3 s
内存限制
256 MB
标签
构造

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。