#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-10, pi = acos(-1.0);
vector<int> a;
int main() {
  int t = 1;
  while (t--) {
    long long n, x, y, a1, a2, a3, a4, pos = -1;
    cin >> a1 >> a2 >> a3 >> a4;
    if (a1 == 0 && a2 == 0 && a3 == 0 && a4 == 0) {
      cout << "1\n";
      return 0;
    }
    double k1 = (1 + sqrt(1 + 8 * a1)) / 2.0;
    double k2 = (1 + sqrt(1 + 8 * a4)) / 2.0;
    x = k1;
    y = k2;
    if (a1 == 0) {
      if (a2 == 0 && a3 == 0)
        x = 0;
      else
        x = 1;
    } else {
      if (k1 - (double)x > 0.0) {
        cout << "Impossible\n";
        return 0;
      }
    }
    if (a4 == 0) {
      if (a2 == 0 && a3 == 0)
        y = 0;
      else
        y = 1;
    } else {
      if (k2 - (double)y > 0.0) {
        cout << "Impossible\n";
        return 0;
      }
    }
    if ((x * y) != a2 + a3) {
      cout << "Impossible\n";
      return 0;
    }
    for (int i = 0; i < x; i++) {
      if (a3 > y)
        a3 -= y;
      else {
        pos = i;
        break;
      }
    }
    for (int i = 0; i < x - pos - 1; i++) a.push_back(0);
    for (int i = 0; i < a3; i++) a.push_back(1);
    if (pos != -1) a.push_back(0);
    for (int i = a3; i < y; i++) a.push_back(1);
    for (int i = 0; i < pos; i++) a.push_back(0);
    for (int i = 0; i < a.size(); i++) cout << a[i];
    cout << "\n";
  }
  return 0;
}

### Prompt

Please provide a Cpp coded solution 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;
const double eps = 1e-10, pi = acos(-1.0);
vector<int> a;
int main() {
  int t = 1;
  while (t--) {
    long long n, x, y, a1, a2, a3, a4, pos = -1;
    cin >> a1 >> a2 >> a3 >> a4;
    if (a1 == 0 && a2 == 0 && a3 == 0 && a4 == 0) {
      cout << "1\n";
      return 0;
    }
    double k1 = (1 + sqrt(1 + 8 * a1)) / 2.0;
    double k2 = (1 + sqrt(1 + 8 * a4)) / 2.0;
    x = k1;
    y = k2;
    if (a1 == 0) {
      if (a2 == 0 && a3 == 0)
        x = 0;
      else
        x = 1;
    } else {
      if (k1 - (double)x > 0.0) {
        cout << "Impossible\n";
        return 0;
      }
    }
    if (a4 == 0) {
      if (a2 == 0 && a3 == 0)
        y = 0;
      else
        y = 1;
    } else {
      if (k2 - (double)y > 0.0) {
        cout << "Impossible\n";
        return 0;
      }
    }
    if ((x * y) != a2 + a3) {
      cout << "Impossible\n";
      return 0;
    }
    for (int i = 0; i < x; i++) {
      if (a3 > y)
        a3 -= y;
      else {
        pos = i;
        break;
      }
    }
    for (int i = 0; i < x - pos - 1; i++) a.push_back(0);
    for (int i = 0; i < a3; i++) a.push_back(1);
    if (pos != -1) a.push_back(0);
    for (int i = a3; i < y; i++) a.push_back(1);
    for (int i = 0; i < pos; i++) a.push_back(0);
    for (int i = 0; i < a.size(); i++) cout << a[i];
    cout << "\n";
  }
  return 0;
}

```