#include <bits/stdc++.h>
using namespace std;
string s;
int main() {
  long long a00, a01, a10, a11, i, j, k, l, n = -1, m = -1;
  cin >> a00 >> a01 >> a10 >> a11;
  long long x, y, p, q, mn;
  x = a00 * 2;
  y = a11 * 2;
  for (i = 1; i <= sqrt(x); i++) {
    if (x % i == 0 && i * (i + 1) == x) {
      n = i + 1;
      break;
    }
  }
  for (i = 1; i <= sqrt(y); i++) {
    if (y % i == 0 && i * (i + 1) == y) {
      m = i + 1;
      break;
    }
  }
  if (a00 == 0 && a11 == 0) {
    if (a10 == 0 && a01 == 0)
      cout << "0";
    else {
      if (a10 == 1 && a01 == 0) {
        cout << "10" << endl;
      } else if (a01 == 1 && a10 == 0) {
        cout << "01" << endl;
      } else
        cout << "Impossible";
    }
    return 0;
  }
  if (a00 == 0 && a11 != 0) {
    if (a01 + a10 != m && a01 + a10 != 0) {
      cout << "Impossible";
      return 0;
    }
    if (m == -1) {
      cout << "Impossible";
    } else {
      for (i = 0; i < a10; i++) {
        cout << 1;
      }
      if (a10 || a01) cout << 0;
      for (i = a10; i < m; i++) {
        cout << 1;
      }
    }
    return 0;
  }
  if (a00 != 0 && a11 == 0) {
    if (a01 + a10 != n && a01 + a10 != 0) {
      cout << "Impossible";
      return 0;
    }
    if (n == -1) {
      cout << "Impossible";
    } else {
      for (i = 0; i < a01; i++) {
        cout << 0;
      }
      if (a01 || a10) cout << 1;
      for (i = a01; i < n; i++) {
        cout << 0;
      }
    }
    return 0;
  }
  mn = m * n;
  if (a01 + a10 != mn) {
    cout << "Impossible" << endl;
    return 0;
  }
  p = a01, q = 0;
  vector<long long> v;
  for (i = n; i >= 1; i--) {
    long long div1 = p / i;
    long long rem = p % i;
    v.push_back(div1);
    p = rem;
    q += div1;
  }
  q = m - q;
  v.push_back(q);
  reverse(v.begin(), v.end());
  for (i = 0; i < v.size(); i++) {
    for (j = 0; j < v[i]; j++) {
      cout << 1;
    }
    if (i != v.size() - 1) cout << 0;
  }
  return 0;
}

### Prompt

Your challenge is to write 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;
string s;
int main() {
  long long a00, a01, a10, a11, i, j, k, l, n = -1, m = -1;
  cin >> a00 >> a01 >> a10 >> a11;
  long long x, y, p, q, mn;
  x = a00 * 2;
  y = a11 * 2;
  for (i = 1; i <= sqrt(x); i++) {
    if (x % i == 0 && i * (i + 1) == x) {
      n = i + 1;
      break;
    }
  }
  for (i = 1; i <= sqrt(y); i++) {
    if (y % i == 0 && i * (i + 1) == y) {
      m = i + 1;
      break;
    }
  }
  if (a00 == 0 && a11 == 0) {
    if (a10 == 0 && a01 == 0)
      cout << "0";
    else {
      if (a10 == 1 && a01 == 0) {
        cout << "10" << endl;
      } else if (a01 == 1 && a10 == 0) {
        cout << "01" << endl;
      } else
        cout << "Impossible";
    }
    return 0;
  }
  if (a00 == 0 && a11 != 0) {
    if (a01 + a10 != m && a01 + a10 != 0) {
      cout << "Impossible";
      return 0;
    }
    if (m == -1) {
      cout << "Impossible";
    } else {
      for (i = 0; i < a10; i++) {
        cout << 1;
      }
      if (a10 || a01) cout << 0;
      for (i = a10; i < m; i++) {
        cout << 1;
      }
    }
    return 0;
  }
  if (a00 != 0 && a11 == 0) {
    if (a01 + a10 != n && a01 + a10 != 0) {
      cout << "Impossible";
      return 0;
    }
    if (n == -1) {
      cout << "Impossible";
    } else {
      for (i = 0; i < a01; i++) {
        cout << 0;
      }
      if (a01 || a10) cout << 1;
      for (i = a01; i < n; i++) {
        cout << 0;
      }
    }
    return 0;
  }
  mn = m * n;
  if (a01 + a10 != mn) {
    cout << "Impossible" << endl;
    return 0;
  }
  p = a01, q = 0;
  vector<long long> v;
  for (i = n; i >= 1; i--) {
    long long div1 = p / i;
    long long rem = p % i;
    v.push_back(div1);
    p = rem;
    q += div1;
  }
  q = m - q;
  v.push_back(q);
  reverse(v.begin(), v.end());
  for (i = 0; i < v.size(); i++) {
    for (j = 0; j < v[i]; j++) {
      cout << 1;
    }
    if (i != v.size() - 1) cout << 0;
  }
  return 0;
}

```