#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int a, b, c, d;
  scanf("%d", &a);
  scanf("%d", &b);
  scanf("%d", &c);
  scanf("%d", &d);
  if (!a && !d) {
    if (!b && c == 1) {
      printf("10");
    } else if (b == 1 && !c) {
      printf("01");
    } else if (!b && !c) {
      printf("0");
    } else {
      printf("Impossible");
    }
    return 0;
  } else if (!a) {
    long long dd = sqrt(8LL * d + 1);
    if (dd * dd != (8LL * d + 1)) {
      printf("Impossible");
      return 0;
    }
    int val_d = (dd - 1) / 2 + 1;
    if (val_d != b + c) {
      if (!b && !c) {
        for (int i = 0; i < val_d; i++) printf("1");
      } else {
        printf("Impossible");
      }
      return 0;
    } else {
      for (int i = 0; i < val_d; i++) {
        if (c == i) printf("0");
        printf("1");
      }
      if (c == val_d) printf("0");
      return 0;
    }
  } else if (!d) {
    long long aa = sqrt(8LL * a + 1);
    if (aa * aa != 8LL * a + 1) {
      printf("Impossible\n");
      return 0;
    }
    int val_a = (aa - 1) / 2 + 1;
    if (val_a != b + c) {
      if (!b && !c) {
        for (int i = 0; i < val_a; i++) printf("0");
      } else {
        printf("Impossible");
      }
      return 0;
    } else {
      for (int i = 0; i < val_a; i++) {
        if (b == i) printf("1");
        printf("0");
      }
      if (b == val_a) printf("1");
      return 0;
    }
  }
  long long aa = sqrt(8LL * a + 1);
  if (aa * aa != 8LL * a + 1) {
    printf("Impossible\n");
    return 0;
  }
  int val_a = (aa - 1) / 2 + 1;
  long long dd = sqrt(8LL * d + 1);
  if (dd * dd != (8LL * d + 1)) {
    printf("Impossible");
    return 0;
  }
  int val_d = (dd - 1) / 2 + 1;
  long long zz = 1LL * val_a * val_d;
  if (zz != b + c) {
    printf("Impossible");
    return 0;
  }
  int idx = (val_d + b - 1) / val_d;
  int lebih = b % val_d;
  for (int i = 0; i < val_a; i++) {
    if (idx - 1 == i) {
      if (lebih)
        for (int j = 0; j < val_d - lebih; j++) printf("1");
      else
        for (int j = 0; j < lebih; j++) printf("1");
    } else if (idx == i) {
      if (lebih)
        for (int j = 0; j < lebih; j++) printf("1");
      else
        for (int j = 0; j < val_d - lebih; j++) printf("1");
    }
    printf("0");
  }
  if (idx == val_a) {
    if (lebih)
      for (int j = 0; j < lebih; j++) printf("1");
    else
      for (int j = 0; j < val_d; j++) printf("1");
  }
  return 0;
}

### Prompt

Please provide a cpp coded solution to the problem described below:

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;
int main(void) {
  int a, b, c, d;
  scanf("%d", &a);
  scanf("%d", &b);
  scanf("%d", &c);
  scanf("%d", &d);
  if (!a && !d) {
    if (!b && c == 1) {
      printf("10");
    } else if (b == 1 && !c) {
      printf("01");
    } else if (!b && !c) {
      printf("0");
    } else {
      printf("Impossible");
    }
    return 0;
  } else if (!a) {
    long long dd = sqrt(8LL * d + 1);
    if (dd * dd != (8LL * d + 1)) {
      printf("Impossible");
      return 0;
    }
    int val_d = (dd - 1) / 2 + 1;
    if (val_d != b + c) {
      if (!b && !c) {
        for (int i = 0; i < val_d; i++) printf("1");
      } else {
        printf("Impossible");
      }
      return 0;
    } else {
      for (int i = 0; i < val_d; i++) {
        if (c == i) printf("0");
        printf("1");
      }
      if (c == val_d) printf("0");
      return 0;
    }
  } else if (!d) {
    long long aa = sqrt(8LL * a + 1);
    if (aa * aa != 8LL * a + 1) {
      printf("Impossible\n");
      return 0;
    }
    int val_a = (aa - 1) / 2 + 1;
    if (val_a != b + c) {
      if (!b && !c) {
        for (int i = 0; i < val_a; i++) printf("0");
      } else {
        printf("Impossible");
      }
      return 0;
    } else {
      for (int i = 0; i < val_a; i++) {
        if (b == i) printf("1");
        printf("0");
      }
      if (b == val_a) printf("1");
      return 0;
    }
  }
  long long aa = sqrt(8LL * a + 1);
  if (aa * aa != 8LL * a + 1) {
    printf("Impossible\n");
    return 0;
  }
  int val_a = (aa - 1) / 2 + 1;
  long long dd = sqrt(8LL * d + 1);
  if (dd * dd != (8LL * d + 1)) {
    printf("Impossible");
    return 0;
  }
  int val_d = (dd - 1) / 2 + 1;
  long long zz = 1LL * val_a * val_d;
  if (zz != b + c) {
    printf("Impossible");
    return 0;
  }
  int idx = (val_d + b - 1) / val_d;
  int lebih = b % val_d;
  for (int i = 0; i < val_a; i++) {
    if (idx - 1 == i) {
      if (lebih)
        for (int j = 0; j < val_d - lebih; j++) printf("1");
      else
        for (int j = 0; j < lebih; j++) printf("1");
    } else if (idx == i) {
      if (lebih)
        for (int j = 0; j < lebih; j++) printf("1");
      else
        for (int j = 0; j < val_d - lebih; j++) printf("1");
    }
    printf("0");
  }
  if (idx == val_a) {
    if (lebih)
      for (int j = 0; j < lebih; j++) printf("1");
    else
      for (int j = 0; j < val_d; j++) printf("1");
  }
  return 0;
}

```