#include <bits/stdc++.h>
const double Pi = 3.14159265;
const int N = 2e5 + 10;
const unsigned long long base = 163;
const long long INF = 0x3f3f3f3f3f3f3f3f;
const int mod = 1e8;
const double eps = 1e-9;
const double pi = acos(-1);
using namespace std;
long long a, b, c, d;
string ss = "Impossible\n";
int main() {
  cin >> a >> b >> c >> d;
  if (a == 0 && b == a && c == a && d == a)
    cout << 0;
  else if (a == d && a == 0) {
    if (b == 1 && c == 0) {
      cout << "01";
    } else if (b == 0 && c == 1) {
      cout << "10";
    } else
      cout << ss;
  } else if (a == 0 && a == b && b == c) {
    long long y = -1;
    for (long long i = 1; i <= 100000; ++i) {
      if (i * (i - 1) / 2 == d) {
        y = i;
        break;
      }
    }
    if (y == -1)
      cout << ss;
    else
      for (int i = 1; i <= y; ++i) cout << 1;
  } else if (d == 0 && d == b && b == c) {
    long long y = -1;
    for (long long i = 1; i <= 100000; ++i) {
      if (i * (i - 1) / 2 == a) {
        y = i;
        break;
      }
    }
    if (y == -1)
      cout << ss;
    else
      for (int i = 1; i <= y; ++i) cout << 0;
  } else {
    long long x = -1;
    for (long long i = 1; i <= 100000; ++i) {
      if (i * (i - 1) / 2 == a) {
        x = i;
        break;
      }
    }
    if (a && x == -1) return cout << ss, 0;
    long long y = -1;
    for (long long i = 1; i <= 100000; ++i) {
      if (i * (i - 1) / 2 == d) {
        y = i;
        break;
      }
    }
    if (d && y == -1) return cout << ss, 0;
    if (x == -1) x = 0;
    if (y == -1) y = 0;
    if (x * y != b + c) return cout << ss, 0;
    string s;
    long long p = b;
    int tot = 0;
    while (b >= x) {
      b -= x;
      tot++;
      s += '1';
    }
    for (int i = 1; i <= x - b; ++i) s += '0';
    if (b) s += '1', tot++;
    for (int i = 1; i <= b; ++i) s += '0';
    for (int i = 1; i <= y - tot; ++i) s += '1';
    reverse(s.begin(), s.end());
    cout << s << endl;
  }
  return 0;
}

### Prompt

Create a solution in CPP for 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>
const double Pi = 3.14159265;
const int N = 2e5 + 10;
const unsigned long long base = 163;
const long long INF = 0x3f3f3f3f3f3f3f3f;
const int mod = 1e8;
const double eps = 1e-9;
const double pi = acos(-1);
using namespace std;
long long a, b, c, d;
string ss = "Impossible\n";
int main() {
  cin >> a >> b >> c >> d;
  if (a == 0 && b == a && c == a && d == a)
    cout << 0;
  else if (a == d && a == 0) {
    if (b == 1 && c == 0) {
      cout << "01";
    } else if (b == 0 && c == 1) {
      cout << "10";
    } else
      cout << ss;
  } else if (a == 0 && a == b && b == c) {
    long long y = -1;
    for (long long i = 1; i <= 100000; ++i) {
      if (i * (i - 1) / 2 == d) {
        y = i;
        break;
      }
    }
    if (y == -1)
      cout << ss;
    else
      for (int i = 1; i <= y; ++i) cout << 1;
  } else if (d == 0 && d == b && b == c) {
    long long y = -1;
    for (long long i = 1; i <= 100000; ++i) {
      if (i * (i - 1) / 2 == a) {
        y = i;
        break;
      }
    }
    if (y == -1)
      cout << ss;
    else
      for (int i = 1; i <= y; ++i) cout << 0;
  } else {
    long long x = -1;
    for (long long i = 1; i <= 100000; ++i) {
      if (i * (i - 1) / 2 == a) {
        x = i;
        break;
      }
    }
    if (a && x == -1) return cout << ss, 0;
    long long y = -1;
    for (long long i = 1; i <= 100000; ++i) {
      if (i * (i - 1) / 2 == d) {
        y = i;
        break;
      }
    }
    if (d && y == -1) return cout << ss, 0;
    if (x == -1) x = 0;
    if (y == -1) y = 0;
    if (x * y != b + c) return cout << ss, 0;
    string s;
    long long p = b;
    int tot = 0;
    while (b >= x) {
      b -= x;
      tot++;
      s += '1';
    }
    for (int i = 1; i <= x - b; ++i) s += '0';
    if (b) s += '1', tot++;
    for (int i = 1; i <= b; ++i) s += '0';
    for (int i = 1; i <= y - tot; ++i) s += '1';
    reverse(s.begin(), s.end());
    cout << s << endl;
  }
  return 0;
}

```