#include <bits/stdc++.h>
using namespace std;
const int N = 1;
long long int fin(long long int x) {
  for (long long int i = 0; i <= 1e6; i++) {
    if (i * (i + 1) / 2 == x) return i + 1;
  }
  return -1;
}
int main() {
  ios::sync_with_stdio(0);
  long long int a, b, c, d, a0, a1;
  cin >> a >> b >> c >> d;
  if (a == 0 && b == 0 && c == 0 && d == 0) return cout << 0, 0;
  long long int j0 = 0;
  for (long long int i = 0; i < 1e6; i++) {
    j0 += i;
    if (j0 == a && b == 0 && c == 0 && d == 0) {
      for (int j = 0; j <= i; j++) cout << 0;
      return 0;
    }
    if (a == 0 && b == 0 && c == 0 && d == j0) {
      for (int j = 0; j <= i; j++) cout << 1;
      return 0;
    }
  }
  a0 = fin(a);
  if (a0 == -1) return cout << "Impossible", 0;
  a1 = fin(d);
  if (a1 == -1) return cout << "Impossible", 0;
  bool sw = 0;
  if (a0 * a1 != b + c) return cout << "Impossible", 0;
  if (b > c) {
    sw = 1;
    swap(a, d);
    swap(b, c);
    swap(a0, a1);
  }
  deque<bool> v;
  long long int fi = a0 + a1;
  for (int i = 0; i < fi; i++) {
    if (a0 <= b) {
      b -= a0;
      v.push_front(1);
      a1--;
    } else {
      a0--;
      v.push_front(0);
    }
  }
  if (sw) {
    for (bool &u : v) {
      u ^= 1;
    }
  }
  for (bool u : v) cout << u;
}

### 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 int N = 1;
long long int fin(long long int x) {
  for (long long int i = 0; i <= 1e6; i++) {
    if (i * (i + 1) / 2 == x) return i + 1;
  }
  return -1;
}
int main() {
  ios::sync_with_stdio(0);
  long long int a, b, c, d, a0, a1;
  cin >> a >> b >> c >> d;
  if (a == 0 && b == 0 && c == 0 && d == 0) return cout << 0, 0;
  long long int j0 = 0;
  for (long long int i = 0; i < 1e6; i++) {
    j0 += i;
    if (j0 == a && b == 0 && c == 0 && d == 0) {
      for (int j = 0; j <= i; j++) cout << 0;
      return 0;
    }
    if (a == 0 && b == 0 && c == 0 && d == j0) {
      for (int j = 0; j <= i; j++) cout << 1;
      return 0;
    }
  }
  a0 = fin(a);
  if (a0 == -1) return cout << "Impossible", 0;
  a1 = fin(d);
  if (a1 == -1) return cout << "Impossible", 0;
  bool sw = 0;
  if (a0 * a1 != b + c) return cout << "Impossible", 0;
  if (b > c) {
    sw = 1;
    swap(a, d);
    swap(b, c);
    swap(a0, a1);
  }
  deque<bool> v;
  long long int fi = a0 + a1;
  for (int i = 0; i < fi; i++) {
    if (a0 <= b) {
      b -= a0;
      v.push_front(1);
      a1--;
    } else {
      a0--;
      v.push_front(0);
    }
  }
  if (sw) {
    for (bool &u : v) {
      u ^= 1;
    }
  }
  for (bool u : v) cout << u;
}

```