#include <bits/stdc++.h>
using namespace std;
int M = 1e9 + 7;
int a00, a01, a10, a11;
int count(int a) {
  if (a == 0) {
    if (a01 || a10) {
      return 1;
    } else
      return 0;
  }
  int c = (sqrt((2.0 * a) + 0.25)) + 0.5;
  if ((c * c - c) != 2 * a) {
    c = -1;
  }
  return c;
}
int main() {
  cin >> a00 >> a01 >> a10 >> a11;
  int c0, c1;
  c0 = count(a00);
  c1 = count(a11);
  bool prnt = false;
  if (a10 + a01 != c0 * c1 || c1 == -1 || c0 == -1) {
    printf("Impossible\n");
  } else if (c0 != 0) {
    int n1 = (a10 / c0);
    int r1 = (a10 % c0);
    for (int i = 0; i < n1; i++) {
      printf("1");
      prnt = true;
    }
    for (int i = 0; i < c0 - r1; i++) {
      printf("0");
      prnt = true;
    }
    if (r1) {
      printf("1");
      prnt = true;
    }
    for (int i = 0; i < r1; i++) {
      printf("0");
      prnt = true;
    }
    for (int i = 0; i < c1 - n1 - ((bool)r1); i++) {
      printf("1");
      prnt = true;
    }
    printf("\n");
  } else {
    for (int i = 0; i < c1; ++i) {
      prnt = true;
      printf("1");
    }
    if (!prnt) printf("1");
  }
  return 0;
}

### 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;
int M = 1e9 + 7;
int a00, a01, a10, a11;
int count(int a) {
  if (a == 0) {
    if (a01 || a10) {
      return 1;
    } else
      return 0;
  }
  int c = (sqrt((2.0 * a) + 0.25)) + 0.5;
  if ((c * c - c) != 2 * a) {
    c = -1;
  }
  return c;
}
int main() {
  cin >> a00 >> a01 >> a10 >> a11;
  int c0, c1;
  c0 = count(a00);
  c1 = count(a11);
  bool prnt = false;
  if (a10 + a01 != c0 * c1 || c1 == -1 || c0 == -1) {
    printf("Impossible\n");
  } else if (c0 != 0) {
    int n1 = (a10 / c0);
    int r1 = (a10 % c0);
    for (int i = 0; i < n1; i++) {
      printf("1");
      prnt = true;
    }
    for (int i = 0; i < c0 - r1; i++) {
      printf("0");
      prnt = true;
    }
    if (r1) {
      printf("1");
      prnt = true;
    }
    for (int i = 0; i < r1; i++) {
      printf("0");
      prnt = true;
    }
    for (int i = 0; i < c1 - n1 - ((bool)r1); i++) {
      printf("1");
      prnt = true;
    }
    printf("\n");
  } else {
    for (int i = 0; i < c1; ++i) {
      prnt = true;
      printf("1");
    }
    if (!prnt) printf("1");
  }
  return 0;
}

```