#include <bits/stdc++.h>
using namespace std;
int x[1000010];
int main() {
  long long i, j, num0, num1, sum01, temp, jishu, zero;
  long long a01, a00, a10, a11, sum, temp1, temp2;
  cin >> a00 >> a01 >> a10 >> a11;
  sum = a00 + a01 + a10 + a11;
  if (sum == 0) {
    printf("0\n");
    return 0;
  }
  if (a01 == 0 && a10 == 0) {
    if (a00 != 0 & a11 != 0) {
      printf("Impossible\n");
      return 0;
    }
    if (a00 != 0) {
      if (sqrt(a00 * 8 + 1) * sqrt(a00 * 8 + 1) != a00 * 8 + 1 ||
          (1 + (int)sqrt(1 + a00 * 8)) % 2 != 0) {
        printf("Impossible\n");
        return 0;
      } else {
        temp = (1 + (int)sqrt(1 + a00 * 8)) / 2;
        for (i = 0; i < temp; i++) printf("0");
        printf("\n");
        return 0;
      }
    }
    if (sqrt(a11 * 8 + 1) * sqrt(a11 * 8 + 1) != a11 * 8 + 1 ||
        (1 + (int)sqrt(1 + a11 * 8)) % 2 != 0) {
      printf("Impossible\n");
      return 0;
    } else {
      temp = (1 + (int)sqrt(1 + a11 * 8)) / 2;
      for (i = 0; i < temp; i++) printf("1");
      printf("\n");
      return 0;
    }
  }
  if (sqrt(a00 * 8 + 1) * sqrt(a00 * 8 + 1) != a00 * 8 + 1 ||
      (1 + (int)sqrt(1 + a00 * 8)) % 2 != 0) {
    printf("Impossible\n");
    return 0;
  }
  if (sqrt(a11 * 8 + 1) * sqrt(a11 * 8 + 1) != a11 * 8 + 1 ||
      (1 + (int)sqrt(1 + a11 * 8)) % 2 != 0) {
    printf("Impossible\n");
    return 0;
  }
  num0 = (1 + (int)sqrt(1 + 8 * a00)) / 2;
  num1 = (1 + (int)sqrt(1 + 8 * a11)) / 2;
  for (i = 0; i < num0; i++) x[i] = 0;
  for (j = num0; j < num0 + num1; j++) x[j] = 1;
  sum01 = num0 * num1;
  i = num0 + num1 - 1;
  jishu = 0;
  while (sum01 > a01) {
    while (i >= 1 && (x[i] != 1 || x[i - 1] != 0)) i--;
    if (i < 1) {
      printf("Impossible\n");
      return 0;
    }
    zero = i - 1;
    while (i < num0 + num1 && x[i] == 1) i++;
    if (sum01 - a01 >= i - zero - 1) {
      x[i - 1] = 0;
      x[zero] = 1;
      sum01 -= i - zero - 1;
      jishu += i - zero - 1;
      i = zero;
    } else {
      x[zero + sum01 - a01] = 0;
      x[zero] = 1;
      jishu += sum01 - a01;
      sum01 = a01;
    }
  }
  if (sum01 != a01 || jishu != a10) {
    printf("Impossible\n");
    return 0;
  }
  for (i = 0; i < num0 + num1; i++) printf("%d", x[i]);
  printf("\n");
  return 0;
}

### Prompt

Your challenge is to write 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;
int x[1000010];
int main() {
  long long i, j, num0, num1, sum01, temp, jishu, zero;
  long long a01, a00, a10, a11, sum, temp1, temp2;
  cin >> a00 >> a01 >> a10 >> a11;
  sum = a00 + a01 + a10 + a11;
  if (sum == 0) {
    printf("0\n");
    return 0;
  }
  if (a01 == 0 && a10 == 0) {
    if (a00 != 0 & a11 != 0) {
      printf("Impossible\n");
      return 0;
    }
    if (a00 != 0) {
      if (sqrt(a00 * 8 + 1) * sqrt(a00 * 8 + 1) != a00 * 8 + 1 ||
          (1 + (int)sqrt(1 + a00 * 8)) % 2 != 0) {
        printf("Impossible\n");
        return 0;
      } else {
        temp = (1 + (int)sqrt(1 + a00 * 8)) / 2;
        for (i = 0; i < temp; i++) printf("0");
        printf("\n");
        return 0;
      }
    }
    if (sqrt(a11 * 8 + 1) * sqrt(a11 * 8 + 1) != a11 * 8 + 1 ||
        (1 + (int)sqrt(1 + a11 * 8)) % 2 != 0) {
      printf("Impossible\n");
      return 0;
    } else {
      temp = (1 + (int)sqrt(1 + a11 * 8)) / 2;
      for (i = 0; i < temp; i++) printf("1");
      printf("\n");
      return 0;
    }
  }
  if (sqrt(a00 * 8 + 1) * sqrt(a00 * 8 + 1) != a00 * 8 + 1 ||
      (1 + (int)sqrt(1 + a00 * 8)) % 2 != 0) {
    printf("Impossible\n");
    return 0;
  }
  if (sqrt(a11 * 8 + 1) * sqrt(a11 * 8 + 1) != a11 * 8 + 1 ||
      (1 + (int)sqrt(1 + a11 * 8)) % 2 != 0) {
    printf("Impossible\n");
    return 0;
  }
  num0 = (1 + (int)sqrt(1 + 8 * a00)) / 2;
  num1 = (1 + (int)sqrt(1 + 8 * a11)) / 2;
  for (i = 0; i < num0; i++) x[i] = 0;
  for (j = num0; j < num0 + num1; j++) x[j] = 1;
  sum01 = num0 * num1;
  i = num0 + num1 - 1;
  jishu = 0;
  while (sum01 > a01) {
    while (i >= 1 && (x[i] != 1 || x[i - 1] != 0)) i--;
    if (i < 1) {
      printf("Impossible\n");
      return 0;
    }
    zero = i - 1;
    while (i < num0 + num1 && x[i] == 1) i++;
    if (sum01 - a01 >= i - zero - 1) {
      x[i - 1] = 0;
      x[zero] = 1;
      sum01 -= i - zero - 1;
      jishu += i - zero - 1;
      i = zero;
    } else {
      x[zero + sum01 - a01] = 0;
      x[zero] = 1;
      jishu += sum01 - a01;
      sum01 = a01;
    }
  }
  if (sum01 != a01 || jishu != a10) {
    printf("Impossible\n");
    return 0;
  }
  for (i = 0; i < num0 + num1; i++) printf("%d", x[i]);
  printf("\n");
  return 0;
}

```