Output Limit Exceeded

아직 제출이 없습니다시간 제한1초메모리 제한256 MB

문제

We all know that (nk)=n(n1)(nk+2)(nk+1)12(k1)k\binom{n}{k} = \frac{n \cdot (n-1) \cdot \ldots \cdot (n-k+2) \cdot (n-k+1)}{1 \cdot 2 \cdot \ldots \cdot (k-1) \cdot k} is an integer number for any 0kn0 \le k \le n. But it would be nice if we could prove it by providing a matching between factors in numerator and denominator, wouldn't it?

Let's build a bipartite graph with kk vertices in each part. The ii-th vertex in the left part corresponds to factor (n+1i)(n+1-i) from numerator and jj-th vertex in the right part corresponds to factor jj from denominator. There is an edge ii --- jj if and only if jj divides (n+1i)(n+1-i). The number kk is provable for nn if there is a perfect matching in this bipartite graph.

Given nn, check if kk is provable for each kk satisfying 0kn0 \le k \le n.

입력

The only line contains one integer nn (0n10180 \le n \le 10^{18}).

출력

Print string of length (n+1)(n+1) consisting of '0' and '1', (k+1)(k+1)-th character should be '1' if and only if kk is provable for nn.

What, you think this will get Output Limit Exceeded? Hmmmm... Okay. Let's compress the string.

Let s_0=“0”s\_0 = \text{“0”} and s_1=“1”s\_1 = \text{“1”}. You can define s_2,s_3,,s_ts\_{2}, s\_{3}, \ldots, s\_{t}. String s_is\_{i} should be a concatenation of several earlier defined strings. Formally, :i:(2it):s_i=s_j_1+s_j_2++s_j_k_i\forall \\: i \\: (2 \le i \le t): s\_{i} = s\_{j\_{1}} + s\_{j\_{2}} + \ldots + s\_{j\_{k\_{i}}}, here 1k_i1 \le k\_{i}, :r:(1rk_i):j_r<i\forall \\: r \\: (1 \le r \le k\_{i}): j\_{r} < i. String s_ts\_{t} should be the answer to the problem.

In the first line print one integer tt (2t5002 \le t \le 500).

In the next t1t-1 lines print the descriptions of s_is\_{i}. Each description should have a form k_i:j_1:j_2::j_k_ik\_{i} \\: j\_{1} \\: j\_{2} \\: \ldots \\: j\_{k\_{i}}, with 1k_i1 \le k\_{i} and 0j_r<i0 \le j\_{r} < i.

Total length of all descriptions should not exceed 10,00010\\,000: _i=2tk_i10,000\sum\_{i=2}^{t} k\_{i} \le 10\\,000.

We can show that for all valid tests there exists a way to construct the answer string abiding all the limitations. If there are several possible ways to do so, print any one of them. Note that you don't have to minimize tt or total length of all descriptions.

힌트

In the third sample: s_2=s_1+s_1="‘1‘"+"‘1‘"="‘11‘"s\_2 = s\_1 + s\_1 = \text{"`1`"}+\text{"`1`"} = \text{"`11`"}, s_3=s_1+s_2+s_0+s_0="‘1‘"+"‘11‘"+"‘0‘"+"‘0‘"="‘11100‘"s\_3 = s\_1 + s\_2 + s\_0 + s\_0 = \text{"`1`"}+\text{"`11`"}+\text{"`0`"}+\text{"`0`"} = \text{"`11100`"}, s_4=s_3+s_1+s_2="‘11100‘"+"‘1‘"+"‘11‘"="‘11100111‘"s\_4 = s\_3 + s\_1 + s\_2 = \text{"`11100`"}+\text{"`1`"}+\text{"`11`"} = \text{"`11100111`"},