#include <bits/stdc++.h>
using namespace std;
long long getint() {
  long long f = 1, x = 0;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return f * x;
}
const int inf = 1234567890;
long long a, b, c, d;
char s[1123456];
int main() {
  a = getint();
  b = getint();
  c = getint();
  d = getint();
  if (b == 0 && c == 0 && a == 0 && d == 0) {
    printf("0");
    return 0;
  }
  int n0 = -1, n1 = -1;
  for (long long i = 1; i <= 1000000; i++) {
    if (i * (i - 1) / 2 == a) n0 = i;
    if (i * (i - 1) / 2 == d) n1 = i;
  }
  if (n1 == -1 || n0 == -1) {
    printf("Impossible");
    return 0;
  }
  if (b == 0 && c == 0) {
    if (n1 == 1)
      n1 = 0;
    else if (n0 == 1)
      n0 = 0;
    else {
      printf("Impossible");
      return 0;
    }
  }
  long long r01 = b, r10 = c;
  long long r1 = n1, r0 = n0;
  for (int i = 1; i <= n1 + n0; i++) {
    if (r01 >= r1 && r1 >= 0) {
      s[i] = '0';
      r01 -= r1;
      r0--;
    } else {
      s[i] = '1';
      r10 -= r0;
      r1--;
    }
    if (r10 < 0 || r1 < 0 || r0 < 0) {
      printf("Impossible");
      return 0;
    }
  }
  if (r10 != 0 || r01 != 0 || r1 != 0 || r0 != 0) {
    printf("Impossible");
    return 0;
  }
  printf("%s", s + 1);
  return 0;
}

### Prompt

Please formulate 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;
long long getint() {
  long long f = 1, x = 0;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return f * x;
}
const int inf = 1234567890;
long long a, b, c, d;
char s[1123456];
int main() {
  a = getint();
  b = getint();
  c = getint();
  d = getint();
  if (b == 0 && c == 0 && a == 0 && d == 0) {
    printf("0");
    return 0;
  }
  int n0 = -1, n1 = -1;
  for (long long i = 1; i <= 1000000; i++) {
    if (i * (i - 1) / 2 == a) n0 = i;
    if (i * (i - 1) / 2 == d) n1 = i;
  }
  if (n1 == -1 || n0 == -1) {
    printf("Impossible");
    return 0;
  }
  if (b == 0 && c == 0) {
    if (n1 == 1)
      n1 = 0;
    else if (n0 == 1)
      n0 = 0;
    else {
      printf("Impossible");
      return 0;
    }
  }
  long long r01 = b, r10 = c;
  long long r1 = n1, r0 = n0;
  for (int i = 1; i <= n1 + n0; i++) {
    if (r01 >= r1 && r1 >= 0) {
      s[i] = '0';
      r01 -= r1;
      r0--;
    } else {
      s[i] = '1';
      r10 -= r0;
      r1--;
    }
    if (r10 < 0 || r1 < 0 || r0 < 0) {
      printf("Impossible");
      return 0;
    }
  }
  if (r10 != 0 || r01 != 0 || r1 != 0 || r0 != 0) {
    printf("Impossible");
    return 0;
  }
  printf("%s", s + 1);
  return 0;
}

```