#include <bits/stdc++.h>
using namespace std;
long long int a, b, c, d, t, k;
long long int bs(long long int l, long long int r, long long int val) {
  if (r == l) {
    if (l * (l - 1) / 2 == val) return l;
    return -1;
  }
  if (r - l == 1) {
    if (l * (l - 1) / 2 == val)
      return l;
    else if (r * (r - 1) / 2 == val)
      return r;
    else
      return -1;
  }
  long long int mid = (l + r) / 2;
  if (mid * (mid - 1) / 2 < val)
    bs(mid + 1, r, val);
  else if (mid * (mid - 1) / 2 == val)
    return mid;
  else
    bs(l, mid - 1, val);
}
int main() {
  scanf("%lld%lld%lld%lld", &a, &b, &c, &d);
  t = bs(0ll, 1000000000ll, a);
  k = bs(0ll, 1000000000ll, d);
  if (t == -1 || k == -1) {
    printf("Impossible\n");
    return 0;
  }
  if (a != 0 && d != 0) {
    if (t * k != b + c) {
      printf("Impossible\n");
      return 0;
    }
  }
  if (a == 0 && (b || c)) t = 1;
  if (d == 0 && (b || c)) k = 1;
  if (!a && !b && !c && !d) t = 1;
  if (!a && !d && (b || c)) {
    t = 1;
    k = 1;
  }
  if (t * k != b + c) {
    printf("Impossible\n");
    return 0;
  }
  for (long long int i = k; i >= 1; i--) {
    c = b / i;
    t -= c;
    for (long long int j = 0; j < c; j++) printf("%d", 0);
    printf("%d", 1);
    b -= c * i;
  }
  while (t > 0) {
    printf("%d", 0);
    t--;
  }
  printf("\n");
}

### Prompt

Generate a Cpp solution to the following problem:

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;
long long int a, b, c, d, t, k;
long long int bs(long long int l, long long int r, long long int val) {
  if (r == l) {
    if (l * (l - 1) / 2 == val) return l;
    return -1;
  }
  if (r - l == 1) {
    if (l * (l - 1) / 2 == val)
      return l;
    else if (r * (r - 1) / 2 == val)
      return r;
    else
      return -1;
  }
  long long int mid = (l + r) / 2;
  if (mid * (mid - 1) / 2 < val)
    bs(mid + 1, r, val);
  else if (mid * (mid - 1) / 2 == val)
    return mid;
  else
    bs(l, mid - 1, val);
}
int main() {
  scanf("%lld%lld%lld%lld", &a, &b, &c, &d);
  t = bs(0ll, 1000000000ll, a);
  k = bs(0ll, 1000000000ll, d);
  if (t == -1 || k == -1) {
    printf("Impossible\n");
    return 0;
  }
  if (a != 0 && d != 0) {
    if (t * k != b + c) {
      printf("Impossible\n");
      return 0;
    }
  }
  if (a == 0 && (b || c)) t = 1;
  if (d == 0 && (b || c)) k = 1;
  if (!a && !b && !c && !d) t = 1;
  if (!a && !d && (b || c)) {
    t = 1;
    k = 1;
  }
  if (t * k != b + c) {
    printf("Impossible\n");
    return 0;
  }
  for (long long int i = k; i >= 1; i--) {
    c = b / i;
    t -= c;
    for (long long int j = 0; j < c; j++) printf("%d", 0);
    printf("%d", 1);
    b -= c * i;
  }
  while (t > 0) {
    printf("%d", 0);
    t--;
  }
  printf("\n");
}

```