#include <bits/stdc++.h>
using namespace std;
int n;
int A[4];
int ff[(1001000)];
int ge0, ge1, ge01, ge10;
inline void solve() {
  ge0 = ge1 = -1;
  for (int i = 1; i <= n; ++i)
    if (ff[i] == A[0]) {
      ge0 = i;
      break;
    }
  for (int i = 1; i <= n; ++i)
    if (ff[i] == A[3]) {
      ge1 = i;
      break;
    }
  if (A[0] == 0 && A[1] == 0 && A[2] == 0) ge0 = 0;
  if (A[3] == 0 && A[2] == 0 && A[1] == 0) ge1 = 0;
  if (A[0] + A[1] + A[2] + A[3] == 0) {
    printf("0\n");
    return;
  }
  if (ge0 == -1 || ge1 == -1) {
    printf("Impossible\n");
    return;
  }
  if (A[1] + A[2] != ge0 * ge1) {
    printf("Impossible\n");
    return;
  }
  ge01 = A[1];
  for (; ge0; --ge0) {
    if (ge01 - ge1 < 0) break;
    printf("0");
    ge01 -= ge1;
  }
  for (int i = 1; i <= ge1 - ge01; ++i) printf("1");
  ge1 = ge01;
  if (ge0) {
    printf("0");
    ge0--;
  }
  for (int i = 1; i <= ge1; ++i) printf("1");
  for (int i = 1; i <= ge0; ++i) printf("0");
}
inline void beforedo() {
  cin >> A[0] >> A[1] >> A[2] >> A[3];
  for (int i = 1; i; ++i) {
    ff[i] = i * (i - 1) / 2;
    if ((long long)i * (long long)(i - 1) > 2000000000) {
      n = i - 1;
      break;
    }
  }
}
int main() {
  beforedo();
  solve();
  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 n;
int A[4];
int ff[(1001000)];
int ge0, ge1, ge01, ge10;
inline void solve() {
  ge0 = ge1 = -1;
  for (int i = 1; i <= n; ++i)
    if (ff[i] == A[0]) {
      ge0 = i;
      break;
    }
  for (int i = 1; i <= n; ++i)
    if (ff[i] == A[3]) {
      ge1 = i;
      break;
    }
  if (A[0] == 0 && A[1] == 0 && A[2] == 0) ge0 = 0;
  if (A[3] == 0 && A[2] == 0 && A[1] == 0) ge1 = 0;
  if (A[0] + A[1] + A[2] + A[3] == 0) {
    printf("0\n");
    return;
  }
  if (ge0 == -1 || ge1 == -1) {
    printf("Impossible\n");
    return;
  }
  if (A[1] + A[2] != ge0 * ge1) {
    printf("Impossible\n");
    return;
  }
  ge01 = A[1];
  for (; ge0; --ge0) {
    if (ge01 - ge1 < 0) break;
    printf("0");
    ge01 -= ge1;
  }
  for (int i = 1; i <= ge1 - ge01; ++i) printf("1");
  ge1 = ge01;
  if (ge0) {
    printf("0");
    ge0--;
  }
  for (int i = 1; i <= ge1; ++i) printf("1");
  for (int i = 1; i <= ge0; ++i) printf("0");
}
inline void beforedo() {
  cin >> A[0] >> A[1] >> A[2] >> A[3];
  for (int i = 1; i; ++i) {
    ff[i] = i * (i - 1) / 2;
    if ((long long)i * (long long)(i - 1) > 2000000000) {
      n = i - 1;
      break;
    }
  }
}
int main() {
  beforedo();
  solve();
  return 0;
}

```