709_D. Recover the String
For each string s consisting of characters '0' and '1' one can define four integers a00, a01, a10 and a11, where axy 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 a00, a01, a10, a11 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 a00, a01, a10 and a11. Each of them doesn't exceed 109.

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.

Examples

Input

1 2 3 4


Output

Impossible


Input

1 2 2 1


Output

0110
```python
a00, a01, a10, a11 = map(int, input().split())
numZeros = 0
numOnes = 0
ans = True

for n0 in range(1, 2*a00 + 1):
    if n0 * (n0 - 1) == 2 * a00:
        numZeros = n0
        break
    elif n0 * (n0 - 1) > 2 * a00:
        ans = False
        break;

for n1 in range(1, 2*a11 + 1):
    if n1 * (n1 - 1) == 2 * a11:
        numOnes = n1
        break
    elif n1 * (n1 - 1) > 2 * a11:
        ans = False
        break;
res = []

def generateResult(x,a01, a10, n0, n1):
    while n0 > 0 or n1 > 0:
        if a01 >= n1 and n1 > 0:
            if n0 >= 1:
                res.append(0)
                a01 = a01 - n1
                n0 = n0-1
            else:
                return
        elif a10 >= n0 and n0 > 0:
            if n1 >= 1:
                res.append(1)
                a10 = a10 - n0
                n1 = n1-1
            else:
                return
        elif n0 > 0 and n1 > 0:
            return
        elif 0 < n0 == a01 + a10 + n0 + n1:
            for i in range(n0):
                res.append(0)
            n0 = 0
        elif 0 < n1 == a01 + a10 + n0 + n1:
            for i in range(n1):
                res.append(1)
            n1 = 0
        else:
            return

if a01 > 0 or a10 > 0:
    numOnes = max(numOnes, 1)
    numZeros = max(numZeros, 1)

if a00 == a01 == a10 == a11 == 0:
    print(1)
elif a11 == 0 and a00 == 0 and a10 == 1 and a01 == 0:
    print("10")
elif a11 == 0 and a00 == 0 and a01 == 1 and a10 == 0:
    print("01")
elif ans:
    generateResult(res, a01, a10, numZeros, numOnes)
    if len(res) == numZeros + numOnes:
        print("".join(map(str, res)))
    else:
        print("Impossible")
else:
    print("Impossible")




```