#include <bits/stdc++.h>
using namespace std;
char ans[1000005];
long long A01, A10, remain0, remain1, len;
int main() {
  long long a00, a01, a10, a11, i, j, k, num0, num1, dt1, dt2;
  double t;
  cin >> a00 >> a01 >> a10 >> a11;
  t = sqrt(1 + 8 * a00);
  if (a00 == 0)
    num0 = 0;
  else if (fabs(t - double(ceil(t))) <= 0.0000001) {
    num0 = (1 + ceil(t)) / 2;
  } else {
    cout << "Impossible";
    return 0;
  }
  t = sqrt(1 + 8 * a11);
  if (a11 == 0)
    num1 = 0;
  else if (fabs(t - double(ceil(t))) <= 0.0000001) {
    num1 = (1 + ceil(t)) / 2;
  } else {
    cout << "Impossible";
    return 0;
  }
  if (a00 == 0 && a11 == 0) {
    if (a10 != 0 || a01 != 0) {
      num0 = 1;
      num1 = 1;
      if (a10 == 1 && a01 == 0) {
        cout << "10";
        return 0;
      } else if (a01 == 1 && a10 == 0) {
        cout << "01";
        return 0;
      }
      cout << "Impossible";
      return 0;
    }
    cout << "0";
    return 0;
  }
  if (a00 == 0) {
    if (a10 != 0 || a01 != 0) num0 = 1;
  }
  if (a11 == 0) {
    if (a10 != 0 || a01 != 0) num1 = 1;
  }
  if (num1 + num0 > 1000000) {
    cout << "Impossible";
    return 0;
  }
  A10 = a10, A01 = a01;
  remain0 = num0, remain1 = num1;
  len = num0 + num1;
  for (i = 1; i <= num0 + num1; i++) {
    if (remain1 <= A01) {
      ans[i] = '0';
      A01 -= remain1;
      remain0--;
    } else if (remain0 <= A10) {
      ans[i] = '1';
      A10 -= remain0;
      remain1--;
    } else
      break;
  }
  if (i == num0 + num1 + 1 && A10 == 0 && A01 == 0) {
    for (i = 1; i <= num0 + num1; i++) {
      printf("%c", ans[i]);
    }
    return 0;
  }
  A10 = a10;
  A01 = a01;
  remain0 = num0;
  remain1 = num1;
  for (i = 1; i <= num0 + num1; i++) {
    if (remain0 <= A10) {
      ans[i] = '1';
      A10 -= remain0;
      remain1--;
    } else if (remain1 <= A01) {
      ans[i] = '0';
      A01 -= remain1;
      remain0--;
    } else
      break;
  }
  if (i <= num0 + num1 || A10 || A01) {
    cout << "Impossible";
    return 0;
  } else {
    for (i = 1; i <= num0 + num1; i++) {
      printf("%c", ans[i]);
    }
    return 0;
  }
}

### Prompt

Develop a solution in Cpp 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;
char ans[1000005];
long long A01, A10, remain0, remain1, len;
int main() {
  long long a00, a01, a10, a11, i, j, k, num0, num1, dt1, dt2;
  double t;
  cin >> a00 >> a01 >> a10 >> a11;
  t = sqrt(1 + 8 * a00);
  if (a00 == 0)
    num0 = 0;
  else if (fabs(t - double(ceil(t))) <= 0.0000001) {
    num0 = (1 + ceil(t)) / 2;
  } else {
    cout << "Impossible";
    return 0;
  }
  t = sqrt(1 + 8 * a11);
  if (a11 == 0)
    num1 = 0;
  else if (fabs(t - double(ceil(t))) <= 0.0000001) {
    num1 = (1 + ceil(t)) / 2;
  } else {
    cout << "Impossible";
    return 0;
  }
  if (a00 == 0 && a11 == 0) {
    if (a10 != 0 || a01 != 0) {
      num0 = 1;
      num1 = 1;
      if (a10 == 1 && a01 == 0) {
        cout << "10";
        return 0;
      } else if (a01 == 1 && a10 == 0) {
        cout << "01";
        return 0;
      }
      cout << "Impossible";
      return 0;
    }
    cout << "0";
    return 0;
  }
  if (a00 == 0) {
    if (a10 != 0 || a01 != 0) num0 = 1;
  }
  if (a11 == 0) {
    if (a10 != 0 || a01 != 0) num1 = 1;
  }
  if (num1 + num0 > 1000000) {
    cout << "Impossible";
    return 0;
  }
  A10 = a10, A01 = a01;
  remain0 = num0, remain1 = num1;
  len = num0 + num1;
  for (i = 1; i <= num0 + num1; i++) {
    if (remain1 <= A01) {
      ans[i] = '0';
      A01 -= remain1;
      remain0--;
    } else if (remain0 <= A10) {
      ans[i] = '1';
      A10 -= remain0;
      remain1--;
    } else
      break;
  }
  if (i == num0 + num1 + 1 && A10 == 0 && A01 == 0) {
    for (i = 1; i <= num0 + num1; i++) {
      printf("%c", ans[i]);
    }
    return 0;
  }
  A10 = a10;
  A01 = a01;
  remain0 = num0;
  remain1 = num1;
  for (i = 1; i <= num0 + num1; i++) {
    if (remain0 <= A10) {
      ans[i] = '1';
      A10 -= remain0;
      remain1--;
    } else if (remain1 <= A01) {
      ans[i] = '0';
      A01 -= remain1;
      remain0--;
    } else
      break;
  }
  if (i <= num0 + num1 || A10 || A01) {
    cout << "Impossible";
    return 0;
  } else {
    for (i = 1; i <= num0 + num1; i++) {
      printf("%c", ans[i]);
    }
    return 0;
  }
}

```