#include <bits/stdc++.h>
using namespace std;
const int N = 1000009;
int ar[N];
long long bsearch(long long x) {
  long long lo = 0, hi = 1e6, mid, r;
  while (lo <= hi) {
    mid = (lo + hi) / 2;
    r = (mid * (mid - 1)) / 2;
    if (r > x)
      hi = mid - 1;
    else if (r < x)
      lo = mid + 1;
    else
      return mid;
  }
  return -1;
}
int main() {
  long long a00, a01, a10, a11, c0, c1;
  scanf("%lld %lld %lld %lld", &a00, &a01, &a10, &a11);
  c0 = bsearch(a00);
  c1 = bsearch(a11);
  if (c0 == -1 || c1 == -1) {
    printf("Impossible\n");
    return 0;
  }
  if (c0 == 0 && (a01 > 0 || a10 > 0)) c0 = 1;
  if (c1 == 0 && (a01 > 0 || a10 > 0)) c1 = 1;
  if (c0 == 0 && c1 == 0) {
    printf("0\n");
    return 0;
  }
  if (a01 + a10 == c0 * c1) {
    int i, id = 1;
    for (i = 1; i <= c0; i++) ar[id++] = 0;
    for (i = 1; i <= c1; i++) ar[id++] = 1;
    long long cur01 = c0 * c1;
    int l = 1, r = c0 + 1;
    while (cur01 != a01) {
      if (cur01 - a01 >= c0) {
        swap(ar[l], ar[r]);
        cur01 -= c0;
        l++, r++;
      } else {
        while (cur01 != a01) {
          swap(ar[r], ar[r - 1]);
          r--;
          cur01 -= 1;
        }
      }
    }
    for (i = 1; i <= c0 + c1; i++) printf("%d", ar[i]);
    printf("\n");
  } else
    printf("Impossible\n");
  return 0;
}

### Prompt

Construct a cpp code solution to the problem outlined:

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

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
const int N = 1000009;
int ar[N];
long long bsearch(long long x) {
  long long lo = 0, hi = 1e6, mid, r;
  while (lo <= hi) {
    mid = (lo + hi) / 2;
    r = (mid * (mid - 1)) / 2;
    if (r > x)
      hi = mid - 1;
    else if (r < x)
      lo = mid + 1;
    else
      return mid;
  }
  return -1;
}
int main() {
  long long a00, a01, a10, a11, c0, c1;
  scanf("%lld %lld %lld %lld", &a00, &a01, &a10, &a11);
  c0 = bsearch(a00);
  c1 = bsearch(a11);
  if (c0 == -1 || c1 == -1) {
    printf("Impossible\n");
    return 0;
  }
  if (c0 == 0 && (a01 > 0 || a10 > 0)) c0 = 1;
  if (c1 == 0 && (a01 > 0 || a10 > 0)) c1 = 1;
  if (c0 == 0 && c1 == 0) {
    printf("0\n");
    return 0;
  }
  if (a01 + a10 == c0 * c1) {
    int i, id = 1;
    for (i = 1; i <= c0; i++) ar[id++] = 0;
    for (i = 1; i <= c1; i++) ar[id++] = 1;
    long long cur01 = c0 * c1;
    int l = 1, r = c0 + 1;
    while (cur01 != a01) {
      if (cur01 - a01 >= c0) {
        swap(ar[l], ar[r]);
        cur01 -= c0;
        l++, r++;
      } else {
        while (cur01 != a01) {
          swap(ar[r], ar[r - 1]);
          r--;
          cur01 -= 1;
        }
      }
    }
    for (i = 1; i <= c0 + c1; i++) printf("%d", ar[i]);
    printf("\n");
  } else
    printf("Impossible\n");
  return 0;
}

```