#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const long long INF = 2e18;
const int N = 131234;
int n, m;
long long num[N];
int main() {
  int i, j;
  num[0] = 0;
  for (i = 1; i < N; ++i) {
    num[i] = 1LL * i * (i - 1) / 2;
  }
  int a, b, c, d;
  scanf("%d%d%d%d", &a, &b, &c, &d);
  if (a + b + c + d == 0) {
    puts("0");
    return 0;
  }
  int zeo = lower_bound(num, num + N, a) - num;
  int ok = 1;
  if (num[zeo] != a) ok = 0;
  int one = lower_bound(num, num + N, d) - num;
  if (num[one] != d) ok = 0;
  if (zeo + one > 1000000) ok = 0;
  if (!ok)
    puts("Impossible");
  else {
    long long tone = one, tzeo = zeo;
    if (!one && (b + c)) one = 1;
    if (!zeo && (b + c)) zeo = 1;
    long long zo = 1LL * zeo * one;
    long long oz = 0;
    if (zo - b == c)
      ok = 1;
    else
      ok = 0;
    if (ok) {
      if (!zeo) {
        for (i = 0; i < one; ++i) printf("1");
        puts("");
        return 0;
      }
      long long beishu = c / zeo;
      long long mo = c % zeo;
      mo = zeo - mo;
      for (i = 0; i < beishu; ++i) printf("1");
      for (i = 0; i < mo; ++i) printf("0");
      if (one - beishu > 0) printf("1");
      for (i = 0; i < zeo - mo; ++i) printf("0");
      for (i = 0; i < one - beishu - 1; ++i) printf("1");
      puts("");
    } else {
      long long oz = 1LL * one * zeo;
      if (oz == b + c)
        ok = 1;
      else
        ok = 0;
      if (ok) {
        if (!one) {
          for (i = 0; i < zeo; ++i) printf("0");
          puts("");
          return 0;
        }
        long long beishu = b / one;
        long long mo = b % one;
        mo = one - mo;
        for (i = 0; i < beishu; ++i) printf("0");
        for (i = 0; i < mo; ++i) printf("1");
        if (zeo - beishu > 0) printf("0");
        for (i = 0; i < one - mo; ++i) printf("1");
        for (i = 0; i < zeo - beishu - 1; ++i) printf("0");
        puts("");
      } else
        puts("Impossible");
    }
  }
}

### Prompt

Your task is to create 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 = 0x3f3f3f3f;
const long long INF = 2e18;
const int N = 131234;
int n, m;
long long num[N];
int main() {
  int i, j;
  num[0] = 0;
  for (i = 1; i < N; ++i) {
    num[i] = 1LL * i * (i - 1) / 2;
  }
  int a, b, c, d;
  scanf("%d%d%d%d", &a, &b, &c, &d);
  if (a + b + c + d == 0) {
    puts("0");
    return 0;
  }
  int zeo = lower_bound(num, num + N, a) - num;
  int ok = 1;
  if (num[zeo] != a) ok = 0;
  int one = lower_bound(num, num + N, d) - num;
  if (num[one] != d) ok = 0;
  if (zeo + one > 1000000) ok = 0;
  if (!ok)
    puts("Impossible");
  else {
    long long tone = one, tzeo = zeo;
    if (!one && (b + c)) one = 1;
    if (!zeo && (b + c)) zeo = 1;
    long long zo = 1LL * zeo * one;
    long long oz = 0;
    if (zo - b == c)
      ok = 1;
    else
      ok = 0;
    if (ok) {
      if (!zeo) {
        for (i = 0; i < one; ++i) printf("1");
        puts("");
        return 0;
      }
      long long beishu = c / zeo;
      long long mo = c % zeo;
      mo = zeo - mo;
      for (i = 0; i < beishu; ++i) printf("1");
      for (i = 0; i < mo; ++i) printf("0");
      if (one - beishu > 0) printf("1");
      for (i = 0; i < zeo - mo; ++i) printf("0");
      for (i = 0; i < one - beishu - 1; ++i) printf("1");
      puts("");
    } else {
      long long oz = 1LL * one * zeo;
      if (oz == b + c)
        ok = 1;
      else
        ok = 0;
      if (ok) {
        if (!one) {
          for (i = 0; i < zeo; ++i) printf("0");
          puts("");
          return 0;
        }
        long long beishu = b / one;
        long long mo = b % one;
        mo = one - mo;
        for (i = 0; i < beishu; ++i) printf("0");
        for (i = 0; i < mo; ++i) printf("1");
        if (zeo - beishu > 0) printf("0");
        for (i = 0; i < one - mo; ++i) printf("1");
        for (i = 0; i < zeo - beishu - 1; ++i) printf("0");
        puts("");
      } else
        puts("Impossible");
    }
  }
}

```