#include <bits/stdc++.h>
using namespace std;
const int oo = 1000000009;
const double eps = 1e-9;
const int mod = 1000000007;
long long finnum(long long sum) {
  for (long long i = 0; i <= 100000; ++i) {
    if ((i * (i - 1)) / 2 == sum) {
      return i;
    }
  }
  return -1;
}
int nos[100005];
int main() {
  long long a[4], sum = 0, x, y, n, co = 0, pos = 0;
  for (int i = 0; i < 4; ++i) cin >> a[i];
  for (int i = 0; i < 4; ++i) sum += a[i];
  if (sum == 0) {
    cout << "0"
         << "\n";
    return 0;
  }
  n = finnum(sum);
  x = finnum(a[0]);
  y = finnum(a[3]);
  if (x == 0 && (a[1] || a[2])) x = 1;
  if (y == 0 && (a[1] || a[2])) y = 1;
  if (n == -1 || x == -1 || y == -1 || n != x + y) {
    cout << "Impossible"
         << "\n";
    return 0;
  }
  for (long long i = 0; i < x; ++i) {
    if ((x - i - 1) * y >= a[2])
      nos[i] = 0;
    else {
      nos[i] = a[2] - (x - i - 1) * y;
      a[2] -= nos[i];
    }
  }
  sort(nos, nos + x);
  nos[x] = 10000000;
  for (int i = 0; i <= y; ++i) {
    while (i == nos[pos]) {
      cout << "0";
      ++pos;
    }
    if (i < y) cout << "1";
  }
  cout << "\n";
}

### Prompt

Develop a solution in Cpp 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 int oo = 1000000009;
const double eps = 1e-9;
const int mod = 1000000007;
long long finnum(long long sum) {
  for (long long i = 0; i <= 100000; ++i) {
    if ((i * (i - 1)) / 2 == sum) {
      return i;
    }
  }
  return -1;
}
int nos[100005];
int main() {
  long long a[4], sum = 0, x, y, n, co = 0, pos = 0;
  for (int i = 0; i < 4; ++i) cin >> a[i];
  for (int i = 0; i < 4; ++i) sum += a[i];
  if (sum == 0) {
    cout << "0"
         << "\n";
    return 0;
  }
  n = finnum(sum);
  x = finnum(a[0]);
  y = finnum(a[3]);
  if (x == 0 && (a[1] || a[2])) x = 1;
  if (y == 0 && (a[1] || a[2])) y = 1;
  if (n == -1 || x == -1 || y == -1 || n != x + y) {
    cout << "Impossible"
         << "\n";
    return 0;
  }
  for (long long i = 0; i < x; ++i) {
    if ((x - i - 1) * y >= a[2])
      nos[i] = 0;
    else {
      nos[i] = a[2] - (x - i - 1) * y;
      a[2] -= nos[i];
    }
  }
  sort(nos, nos + x);
  nos[x] = 10000000;
  for (int i = 0; i <= y; ++i) {
    while (i == nos[pos]) {
      cout << "0";
      ++pos;
    }
    if (i < y) cout << "1";
  }
  cout << "\n";
}

```