#include <bits/stdc++.h>
using namespace std;
long long a0, a1, a2, a3;
map<long long, long long> C2;
int main() {
  scanf("%lld %lld %lld %lld", &a0, &a1, &a2, &a3);
  for (long long i = 2; i <= 100000; ++i) {
    C2[i * (i - 1) / 2] = i;
  }
  long long sum = a0 + a1 + a2 + a3;
  if (!sum) {
    cout << "0" << endl;
    return 0;
  }
  if ((a0 != 0 && C2.count(a0) == 0) || (a3 != 0 && C2.count(a3) == 0)) {
    cout << "Impossible" << endl;
    return 0;
  }
  long long n0 = 0, n1 = 0;
  if (C2.count(a0)) n0 = C2[a0];
  if (C2.count(a3)) n1 = C2[a3];
  if (a0 && !a1 && !a2 && !a3) {
    for (int i = 0; i < n0; ++i) printf("0");
    printf("\n");
    return 0;
  }
  if (!a0 && !a1 && !a2 && a3) {
    for (int i = 0; i < n1; ++i) printf("1");
    printf("\n");
    return 0;
  }
  if (!a0 && a1 && !a2 && !a3) {
    if (a1 > 1) {
      cout << "Impossible" << endl;
      return 0;
    }
    printf("0");
    for (long long i = 0; i < a1; ++i) printf("1");
    printf("\n");
    return 0;
  }
  if (!a0 && !a1 && a2 && !a3) {
    if (a2 > 1) {
      cout << "Impossible" << endl;
      return 0;
    }
    printf("1");
    for (int i = 0; i < a2; ++i) printf("0");
    printf("\n");
    return 0;
  }
  if (n0 == 0) {
    if (a1 + a2 != n1) {
      cout << "Impossible" << endl;
      return 0;
    }
    for (int i = 0; i < a2; ++i) printf("1");
    printf("0");
    for (int i = 0; i < a1; ++i) printf("1");
    printf("\n");
    return 0;
  }
  long long q2 = a1 / n0, r1 = a1 % n0, q1 = a2 / n0, r2 = a2 % n0;
  if (n0 && n1 && q2 * n0 + r1 + q1 * n0 + r2 != (n0 * n1)) {
    cout << "Impossible" << endl;
    return 0;
  }
  if (n0 && !n1 && (q2 * n0 + r1 + q1 * n0 + r2 != n0)) {
    cout << "Impossible" << endl;
    return 0;
  }
  for (int i = 0; i < q1; ++i) printf("1");
  for (int i = 0; i < n0; ++i) {
    if (i == r1 && i != 0) printf("1");
    printf("0");
  }
  for (int i = 0; i < q2; ++i) printf("1");
  printf("\n");
  return 0;
}

### Prompt

Please formulate 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 a0, a1, a2, a3;
map<long long, long long> C2;
int main() {
  scanf("%lld %lld %lld %lld", &a0, &a1, &a2, &a3);
  for (long long i = 2; i <= 100000; ++i) {
    C2[i * (i - 1) / 2] = i;
  }
  long long sum = a0 + a1 + a2 + a3;
  if (!sum) {
    cout << "0" << endl;
    return 0;
  }
  if ((a0 != 0 && C2.count(a0) == 0) || (a3 != 0 && C2.count(a3) == 0)) {
    cout << "Impossible" << endl;
    return 0;
  }
  long long n0 = 0, n1 = 0;
  if (C2.count(a0)) n0 = C2[a0];
  if (C2.count(a3)) n1 = C2[a3];
  if (a0 && !a1 && !a2 && !a3) {
    for (int i = 0; i < n0; ++i) printf("0");
    printf("\n");
    return 0;
  }
  if (!a0 && !a1 && !a2 && a3) {
    for (int i = 0; i < n1; ++i) printf("1");
    printf("\n");
    return 0;
  }
  if (!a0 && a1 && !a2 && !a3) {
    if (a1 > 1) {
      cout << "Impossible" << endl;
      return 0;
    }
    printf("0");
    for (long long i = 0; i < a1; ++i) printf("1");
    printf("\n");
    return 0;
  }
  if (!a0 && !a1 && a2 && !a3) {
    if (a2 > 1) {
      cout << "Impossible" << endl;
      return 0;
    }
    printf("1");
    for (int i = 0; i < a2; ++i) printf("0");
    printf("\n");
    return 0;
  }
  if (n0 == 0) {
    if (a1 + a2 != n1) {
      cout << "Impossible" << endl;
      return 0;
    }
    for (int i = 0; i < a2; ++i) printf("1");
    printf("0");
    for (int i = 0; i < a1; ++i) printf("1");
    printf("\n");
    return 0;
  }
  long long q2 = a1 / n0, r1 = a1 % n0, q1 = a2 / n0, r2 = a2 % n0;
  if (n0 && n1 && q2 * n0 + r1 + q1 * n0 + r2 != (n0 * n1)) {
    cout << "Impossible" << endl;
    return 0;
  }
  if (n0 && !n1 && (q2 * n0 + r1 + q1 * n0 + r2 != n0)) {
    cout << "Impossible" << endl;
    return 0;
  }
  for (int i = 0; i < q1; ++i) printf("1");
  for (int i = 0; i < n0; ++i) {
    if (i == r1 && i != 0) printf("1");
    printf("0");
  }
  for (int i = 0; i < q2; ++i) printf("1");
  printf("\n");
  return 0;
}

```