#include <bits/stdc++.h>
using namespace std;
int bs(int n) {
  int l = 0;
  int r = 1000001;
  while (l + 1 != r) {
    long long m = l + (r - l) / 2;
    long long s = (m * (m + 1)) / 2;
    if (s > n) {
      r = m;
    } else if (s < n) {
      l = m;
    } else if (s == n) {
      l = m;
      break;
    }
  }
  if ((1ll * l * (l + 1)) / 2 == n) {
    return l;
  } else {
    return -2;
  }
}
int main() {
  int a, b, c, d;
  scanf("%d %d %d %d", &a, &b, &c, &d);
  int zeros = bs(a), ones = bs(d);
  if (b + c) {
    zeros++, ones++;
  } else {
    if (zeros) zeros++;
    if (ones) ones++;
  }
  if (zeros < 0 || ones < 0 || zeros * ones != b + c) {
    printf("Impossible\n");
    return 0;
  }
  if (!zeros && !ones) {
    printf("1\n");
  }
  if (!zeros || !ones) {
    for (int i = 0; i < zeros + ones; i++) printf("%c", ones ? '1' : '0');
    printf("\n");
    return 0;
  }
  int bones = c / zeros;
  int mone = c % zeros;
  int eones = b / zeros;
  assert(bones + (mone > 0) + eones == ones);
  assert(ones + zeros < 1000000);
  assert((c % zeros + b % zeros) % zeros == 0);
  for (int i = 0; i < bones; i++) {
    printf("1");
  }
  for (int i = 0; i < zeros - mone; i++) {
    printf("0");
  }
  if (mone) printf("1");
  for (int i = 0; i < mone; i++) {
    printf("0");
  }
  for (int i = 0; i < eones; i++) {
    printf("1");
  }
  printf("\n");
  return 0;
}

### Prompt

Your challenge is to write 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;
int bs(int n) {
  int l = 0;
  int r = 1000001;
  while (l + 1 != r) {
    long long m = l + (r - l) / 2;
    long long s = (m * (m + 1)) / 2;
    if (s > n) {
      r = m;
    } else if (s < n) {
      l = m;
    } else if (s == n) {
      l = m;
      break;
    }
  }
  if ((1ll * l * (l + 1)) / 2 == n) {
    return l;
  } else {
    return -2;
  }
}
int main() {
  int a, b, c, d;
  scanf("%d %d %d %d", &a, &b, &c, &d);
  int zeros = bs(a), ones = bs(d);
  if (b + c) {
    zeros++, ones++;
  } else {
    if (zeros) zeros++;
    if (ones) ones++;
  }
  if (zeros < 0 || ones < 0 || zeros * ones != b + c) {
    printf("Impossible\n");
    return 0;
  }
  if (!zeros && !ones) {
    printf("1\n");
  }
  if (!zeros || !ones) {
    for (int i = 0; i < zeros + ones; i++) printf("%c", ones ? '1' : '0');
    printf("\n");
    return 0;
  }
  int bones = c / zeros;
  int mone = c % zeros;
  int eones = b / zeros;
  assert(bones + (mone > 0) + eones == ones);
  assert(ones + zeros < 1000000);
  assert((c % zeros + b % zeros) % zeros == 0);
  for (int i = 0; i < bones; i++) {
    printf("1");
  }
  for (int i = 0; i < zeros - mone; i++) {
    printf("0");
  }
  if (mone) printf("1");
  for (int i = 0; i < mone; i++) {
    printf("0");
  }
  for (int i = 0; i < eones; i++) {
    printf("1");
  }
  printf("\n");
  return 0;
}

```