#include <bits/stdc++.h>
using namespace std;
int get(int x) {
  long long y = 0;
  while (y * (y - 1) < 2 * x) y++;
  if (y * (y - 1) == 2 * x) return y;
  return -1;
}
bool ok(int x, int y, int b, int c) {
  if (x == -1 || y == -1 || (b + c) != x * y) {
    return false;
  }
  return true;
}
int main() {
  int a, b, c, d;
  scanf("%d %d %d %d", &a, &b, &c, &d);
  long long x = get(a), y = get(d);
  if (a == 0 && d == 0) {
    for (int i = 0; i < 2; i++) {
      for (int j = 0; j < 2; j++) {
        if (ok(i, j, b, c)) {
          x = i, y = j;
        }
      }
    }
  } else if (a == 0) {
    if (ok(0, y, b, c)) {
      x = 0;
    }
    if (ok(1, y, b, c)) {
      x = 1;
    }
  } else if (d == 0) {
    if (ok(x, 0, b, c)) {
      y = 0;
    }
    if (ok(x, 1, b, c)) {
      y = 1;
    }
  }
  if (!ok(x, y, b, c)) {
    puts("Impossible");
    return 0;
  }
  string ans = string(y, '1') + string(x, '0');
  int u = x;
  for (int i = y - 1; i >= 0; i--) {
    if (b == 0) break;
    int p = min(b, u);
    b -= p;
    swap(ans[i], ans[i + p]);
  }
  cout << ans << endl;
  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;
int get(int x) {
  long long y = 0;
  while (y * (y - 1) < 2 * x) y++;
  if (y * (y - 1) == 2 * x) return y;
  return -1;
}
bool ok(int x, int y, int b, int c) {
  if (x == -1 || y == -1 || (b + c) != x * y) {
    return false;
  }
  return true;
}
int main() {
  int a, b, c, d;
  scanf("%d %d %d %d", &a, &b, &c, &d);
  long long x = get(a), y = get(d);
  if (a == 0 && d == 0) {
    for (int i = 0; i < 2; i++) {
      for (int j = 0; j < 2; j++) {
        if (ok(i, j, b, c)) {
          x = i, y = j;
        }
      }
    }
  } else if (a == 0) {
    if (ok(0, y, b, c)) {
      x = 0;
    }
    if (ok(1, y, b, c)) {
      x = 1;
    }
  } else if (d == 0) {
    if (ok(x, 0, b, c)) {
      y = 0;
    }
    if (ok(x, 1, b, c)) {
      y = 1;
    }
  }
  if (!ok(x, y, b, c)) {
    puts("Impossible");
    return 0;
  }
  string ans = string(y, '1') + string(x, '0');
  int u = x;
  for (int i = y - 1; i >= 0; i--) {
    if (b == 0) break;
    int p = min(b, u);
    b -= p;
    swap(ans[i], ans[i + p]);
  }
  cout << ans << endl;
  return 0;
}

```