#include <bits/stdc++.h>
using namespace std;
const int inf_int = 2e9;
const long long inf_ll = 2e18;
int Gcd(int p, int q) { return q == 0 ? p : Gcd(q, p % q); }
int Pow(int p, int q) {
  int ans = 1;
  while (q) {
    if (q & 1) ans = ans * p;
    p = p * p;
    q >>= 1;
  }
  return ans;
}
inline int read() {
  int ra, fh;
  char rx;
  rx = getchar(), ra = 0, fh = 1;
  while ((rx < '0' || rx > '9') && rx != '-') rx = getchar();
  if (rx == '-') fh = -1, rx = getchar();
  while (rx >= '0' && rx <= '9') ra *= 10, ra += rx - 48, rx = getchar();
  return ra * fh;
}
int f(int x) {
  if (x & 1)
    return (x - 1) / 2 * x;
  else
    return x / 2 * (x - 1);
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int a, b, c, d;
  scanf("%d%d%d%d", &a, &b, &c, &d);
  int flag = 0;
  int A = 0, B = 0;
  for (int i = 0; f(i) <= a; i++) {
    if (f(i) == a) {
      for (int j = 0; f(j) <= d; j++) {
        if (f(j) == d) {
          if (i * j == b + c) {
            A = i;
            B = j;
            flag = 1;
          }
        }
      }
    }
  }
  if (!flag) {
    printf("Impossible\n");
  } else {
    int sum = A + B;
    for (int i = 1; i <= sum; i++) {
      if (c >= A) {
        c -= A;
        B--;
        printf("1");
      } else {
        A--;
        printf("0");
      }
    }
    printf("\n");
  }
  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;
const int inf_int = 2e9;
const long long inf_ll = 2e18;
int Gcd(int p, int q) { return q == 0 ? p : Gcd(q, p % q); }
int Pow(int p, int q) {
  int ans = 1;
  while (q) {
    if (q & 1) ans = ans * p;
    p = p * p;
    q >>= 1;
  }
  return ans;
}
inline int read() {
  int ra, fh;
  char rx;
  rx = getchar(), ra = 0, fh = 1;
  while ((rx < '0' || rx > '9') && rx != '-') rx = getchar();
  if (rx == '-') fh = -1, rx = getchar();
  while (rx >= '0' && rx <= '9') ra *= 10, ra += rx - 48, rx = getchar();
  return ra * fh;
}
int f(int x) {
  if (x & 1)
    return (x - 1) / 2 * x;
  else
    return x / 2 * (x - 1);
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int a, b, c, d;
  scanf("%d%d%d%d", &a, &b, &c, &d);
  int flag = 0;
  int A = 0, B = 0;
  for (int i = 0; f(i) <= a; i++) {
    if (f(i) == a) {
      for (int j = 0; f(j) <= d; j++) {
        if (f(j) == d) {
          if (i * j == b + c) {
            A = i;
            B = j;
            flag = 1;
          }
        }
      }
    }
  }
  if (!flag) {
    printf("Impossible\n");
  } else {
    int sum = A + B;
    for (int i = 1; i <= sum; i++) {
      if (c >= A) {
        c -= A;
        B--;
        printf("1");
      } else {
        A--;
        printf("0");
      }
    }
    printf("\n");
  }
  return 0;
}

```