#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100000 + 10;
long long f(int x) { return x * (x - 1) / 2; }
int main() {
  long long a, b, c, d;
  cin >> a >> b >> c >> d;
  if (!a && !d) {
    if (b == 1 && c == 0)
      cout << "01";
    else if (b == 0 && c == 1)
      cout << "10";
    else if (b == 0 && c == 0)
      cout << "0";
    else
      cout << "Impossible";
    return 0;
  }
  long long n0 = (long long)((1 + sqrt(1 + 8 * a)) / 2);
  long long t = n0, t2 = n0 + 1, t3 = n0 - 1;
  if (f(t) != a && f(t + 1) != a && f(t - 1) != a) {
    printf("Impossible\n");
    return 0;
  }
  if (f(t - 1) == a)
    n0 = t - 1;
  else if (f(t) == a)
    n0 = t;
  else
    n0 = t + 1;
  long long n1 = (long long)((1 + sqrt(1 + 8 * d)) / 2);
  t = n1, t2 = n1 + 1, t3 = n1 - 1;
  if (f(t) != d && f(t + 1) != d && f(t - 1) != d) {
    printf("Impossible\n");
    return 0;
  }
  if (f(t - 1) == d)
    n1 = t - 1;
  else if (f(t) == d)
    n1 = t;
  else
    n1 = t + 1;
  if (b + c != n0 * n1 && n0 && n1) {
    cout << "Impossible";
    return 0;
  } else if (b + c != n0 * n1 && !n0 && n1) {
    if (b + c != n1)
      cout << "Impossible";
    else {
      for (int i = 0; i < c; ++i) cout << "1";
      cout << "0";
      for (int i = 0; i < b; ++i) cout << "1";
    }
    return 0;
  } else if (b + c != n0 * n1 && n0 && !n1) {
    if (b + c != n0)
      cout << "Impossible";
    else {
      for (int i = 0; i < b; ++i) cout << "0";
      cout << "1";
      for (int i = 0; i < c; ++i) cout << "0";
    }
    return 0;
  } else if (b + c != n0 * n1 && !n0 && !n1) {
    cout << "Impossible";
    return 0;
  }
  long long b2 = n0 * n1 - b;
  for (int i = 0; i < (!n0 ? 0 : (b2 / n0)); ++i) cout << "1";
  long long len = !n0 ? 0 : b2 % n0;
  for (int i = 0; i < n0 - len; ++i) cout << "0";
  if (n1 - (!n0 ? 0 : (b2 / n0))) cout << "1";
  for (int i = 0; i < len; ++i) cout << "0";
  for (int i = 0; i < n1 - ((!n0 ? 0 : (b2 / n0)) + 1); ++i) cout << "1";
}

### Prompt

Your task is to create 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;
const int MAXN = 100000 + 10;
long long f(int x) { return x * (x - 1) / 2; }
int main() {
  long long a, b, c, d;
  cin >> a >> b >> c >> d;
  if (!a && !d) {
    if (b == 1 && c == 0)
      cout << "01";
    else if (b == 0 && c == 1)
      cout << "10";
    else if (b == 0 && c == 0)
      cout << "0";
    else
      cout << "Impossible";
    return 0;
  }
  long long n0 = (long long)((1 + sqrt(1 + 8 * a)) / 2);
  long long t = n0, t2 = n0 + 1, t3 = n0 - 1;
  if (f(t) != a && f(t + 1) != a && f(t - 1) != a) {
    printf("Impossible\n");
    return 0;
  }
  if (f(t - 1) == a)
    n0 = t - 1;
  else if (f(t) == a)
    n0 = t;
  else
    n0 = t + 1;
  long long n1 = (long long)((1 + sqrt(1 + 8 * d)) / 2);
  t = n1, t2 = n1 + 1, t3 = n1 - 1;
  if (f(t) != d && f(t + 1) != d && f(t - 1) != d) {
    printf("Impossible\n");
    return 0;
  }
  if (f(t - 1) == d)
    n1 = t - 1;
  else if (f(t) == d)
    n1 = t;
  else
    n1 = t + 1;
  if (b + c != n0 * n1 && n0 && n1) {
    cout << "Impossible";
    return 0;
  } else if (b + c != n0 * n1 && !n0 && n1) {
    if (b + c != n1)
      cout << "Impossible";
    else {
      for (int i = 0; i < c; ++i) cout << "1";
      cout << "0";
      for (int i = 0; i < b; ++i) cout << "1";
    }
    return 0;
  } else if (b + c != n0 * n1 && n0 && !n1) {
    if (b + c != n0)
      cout << "Impossible";
    else {
      for (int i = 0; i < b; ++i) cout << "0";
      cout << "1";
      for (int i = 0; i < c; ++i) cout << "0";
    }
    return 0;
  } else if (b + c != n0 * n1 && !n0 && !n1) {
    cout << "Impossible";
    return 0;
  }
  long long b2 = n0 * n1 - b;
  for (int i = 0; i < (!n0 ? 0 : (b2 / n0)); ++i) cout << "1";
  long long len = !n0 ? 0 : b2 % n0;
  for (int i = 0; i < n0 - len; ++i) cout << "0";
  if (n1 - (!n0 ? 0 : (b2 / n0))) cout << "1";
  for (int i = 0; i < len; ++i) cout << "0";
  for (int i = 0; i < n1 - ((!n0 ? 0 : (b2 / n0)) + 1); ++i) cout << "1";
}

```