#include <bits/stdc++.h>
using namespace std;
long long a[5], x, y;
int main() {
  cin >> a[1] >> a[2] >> a[3] >> a[4];
  int i;
  x = 1;
  while (x * (x - 1) < 2 * a[1]) x++;
  if (x * (x - 1) > 2 * a[1]) {
    cout << "Impossible\n";
    return 0;
  }
  y = 1;
  while (y * (y - 1) < 2 * a[4]) y++;
  if (y * (y - 1) > 2 * a[4]) {
    cout << "Impossible\n";
    return 0;
  }
  if (a[2] == 0 && a[3] == 0) {
    if (a[1] > 0 && a[4] > 0) {
      cout << "Impossible\n";
      return 0;
    }
    if (a[4] > 0) {
      for (i = 1; i <= y; i++) cout << 1;
    } else
      for (i = 1; i <= x; i++) cout << 0;
    cout << "\n";
    return 0;
  }
  if (a[2] + a[3] != x * y) {
    cout << "Impossible\n";
    return 0;
  }
  int cnt = a[2] / y, r = a[2] % y;
  for (i = 1; i <= cnt; i++) cout << 0;
  for (i = 1; i <= y - r; i++) cout << 1;
  if (cnt < x) cout << 0;
  for (i = 1; i <= r; i++) cout << 1;
  for (i = 1; i <= x - cnt - 1; i++) cout << 0;
  cout << "\n";
  return 0;
}

### Prompt

Create a solution in CPP for 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;
long long a[5], x, y;
int main() {
  cin >> a[1] >> a[2] >> a[3] >> a[4];
  int i;
  x = 1;
  while (x * (x - 1) < 2 * a[1]) x++;
  if (x * (x - 1) > 2 * a[1]) {
    cout << "Impossible\n";
    return 0;
  }
  y = 1;
  while (y * (y - 1) < 2 * a[4]) y++;
  if (y * (y - 1) > 2 * a[4]) {
    cout << "Impossible\n";
    return 0;
  }
  if (a[2] == 0 && a[3] == 0) {
    if (a[1] > 0 && a[4] > 0) {
      cout << "Impossible\n";
      return 0;
    }
    if (a[4] > 0) {
      for (i = 1; i <= y; i++) cout << 1;
    } else
      for (i = 1; i <= x; i++) cout << 0;
    cout << "\n";
    return 0;
  }
  if (a[2] + a[3] != x * y) {
    cout << "Impossible\n";
    return 0;
  }
  int cnt = a[2] / y, r = a[2] % y;
  for (i = 1; i <= cnt; i++) cout << 0;
  for (i = 1; i <= y - r; i++) cout << 1;
  if (cnt < x) cout << 0;
  for (i = 1; i <= r; i++) cout << 1;
  for (i = 1; i <= x - cnt - 1; i++) cout << 0;
  cout << "\n";
  return 0;
}

```