AIM Tech Round 3 (Div. 2)
D
Recover the String
Codeforces
未评级
原题
← CE →
翻译中…

For each string $*s*$ consisting of characters '0' and '1' one can define four integers $*a*_{00}$, $*a*_{01}$, $*a*_{10}$ and $*a*_{11}$, where $*a*_{*xy*}$ is the number of subsequences of length $2$ of the string $*s*$ equal to the sequence ${*x*, *y*}$.

翻译中…

In these problem you are given four integers $*a*_{00}$, $*a*_{01}$, $*a*_{10}$, $*a*_{11}$ and have to find any non-empty string $*s*$ that matches them, or determine that there is no such string. One can prove that if at least one answer exists, there exists an answer of length no more than $1 000 000$.

翻译中…

Input

翻译中…

The only line of the input contains four non-negative integers $*a*_{00}$, $*a*_{01}$, $*a*_{10}$ and $*a*_{11}$. Each of them doesn't exceed $10^{9}$.

翻译中…

Output

翻译中…

If there exists a non-empty string that matches four integers from the input, print it in the only line of the output. Otherwise, print "Impossible". The length of your answer must not exceed $1 000 000$.

翻译中…

样例

Input #1
1 2 3 4
Output #1
Impossible
InputCopy OutputCopy
Input #2
1 2 2 1
Output #2
0110
InputCopy OutputCopy
题目信息
题号
709D
时间限制
1 s
内存限制
256 MB

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