#include <bits/stdc++.h>
using namespace std;
int i;
long long a00, a01, a10, a11;
vector<char> ans;
bool check(long long u) {
  long long val = (long long)sqrt(u) * (long long)sqrt(u);
  return val == u;
}
int main() {
  scanf("%lld%lld%lld%lld", &a00, &a01, &a10, &a11);
  if (!check(8LL * a00 + 1LL) || !check(8LL * a11 + 1LL))
    return 0 * printf("Impossible\n");
  long long num0 = sqrt(8LL * a00 + 1LL) / 2 + 1;
  long long num1 = sqrt(8LL * a11 + 1LL) / 2 + 1;
  if (a01 == 0 && a10 == 0) {
    if (a00 > 0 && a11 > 0) return 0 * printf("Impossible\n");
    if (a00 == 0) {
      for (i = 0; i < num1; i++) ans.push_back('1');
    } else {
      for (i = 0; i < num0; i++) ans.push_back('0');
    }
    for (i = 0; i < ans.size(); i++) printf("%c", ans[i]);
    printf("\n");
    return 0;
  }
  long long first = a10 / num0;
  long long lastpos = a10 % num0;
  if (num0 + num1 > 1000000 || first > num1) return 0 * printf("Impossible\n");
  for (i = 0; i < first; i++) {
    ans.push_back('1');
    num1--;
  }
  if (lastpos != 0) {
    long long tmp = num0;
    for (i = 0; i < tmp - lastpos; i++) {
      ans.push_back('0');
      num0--;
    }
    ans.push_back('1');
    num1--;
  }
  if (num1 < 0) return 0 * printf("Impossible\n");
  long long tmp = num0;
  for (i = 0; i < tmp; i++) {
    ans.push_back('0');
    num0--;
  }
  tmp = num1;
  for (i = 0; i < tmp; i++) {
    ans.push_back('1');
    num1--;
  }
  if (num1 != 0 || num0 != 0) return 0 * printf("Impossible\n");
  long long zero = 0;
  long long one = 0;
  long long inv = 0;
  long long inv1 = 0;
  long long inv2 = 0;
  long long inv3 = 0;
  for (i = 0; i < ans.size(); i++) {
    if (ans[i] == '0') {
      inv += one;
      inv2 += zero;
      zero++;
    } else {
      inv1 += zero;
      inv3 += one;
      one++;
    }
  }
  if (inv == a10 && inv1 == a01 && inv2 == a00 && inv3 == a11) {
    for (i = 0; i < ans.size(); i++) printf("%c", ans[i]);
    printf("\n");
  } else
    printf("Impossible\n");
}

### Prompt

Construct a CPP code solution to the problem outlined:

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 i;
long long a00, a01, a10, a11;
vector<char> ans;
bool check(long long u) {
  long long val = (long long)sqrt(u) * (long long)sqrt(u);
  return val == u;
}
int main() {
  scanf("%lld%lld%lld%lld", &a00, &a01, &a10, &a11);
  if (!check(8LL * a00 + 1LL) || !check(8LL * a11 + 1LL))
    return 0 * printf("Impossible\n");
  long long num0 = sqrt(8LL * a00 + 1LL) / 2 + 1;
  long long num1 = sqrt(8LL * a11 + 1LL) / 2 + 1;
  if (a01 == 0 && a10 == 0) {
    if (a00 > 0 && a11 > 0) return 0 * printf("Impossible\n");
    if (a00 == 0) {
      for (i = 0; i < num1; i++) ans.push_back('1');
    } else {
      for (i = 0; i < num0; i++) ans.push_back('0');
    }
    for (i = 0; i < ans.size(); i++) printf("%c", ans[i]);
    printf("\n");
    return 0;
  }
  long long first = a10 / num0;
  long long lastpos = a10 % num0;
  if (num0 + num1 > 1000000 || first > num1) return 0 * printf("Impossible\n");
  for (i = 0; i < first; i++) {
    ans.push_back('1');
    num1--;
  }
  if (lastpos != 0) {
    long long tmp = num0;
    for (i = 0; i < tmp - lastpos; i++) {
      ans.push_back('0');
      num0--;
    }
    ans.push_back('1');
    num1--;
  }
  if (num1 < 0) return 0 * printf("Impossible\n");
  long long tmp = num0;
  for (i = 0; i < tmp; i++) {
    ans.push_back('0');
    num0--;
  }
  tmp = num1;
  for (i = 0; i < tmp; i++) {
    ans.push_back('1');
    num1--;
  }
  if (num1 != 0 || num0 != 0) return 0 * printf("Impossible\n");
  long long zero = 0;
  long long one = 0;
  long long inv = 0;
  long long inv1 = 0;
  long long inv2 = 0;
  long long inv3 = 0;
  for (i = 0; i < ans.size(); i++) {
    if (ans[i] == '0') {
      inv += one;
      inv2 += zero;
      zero++;
    } else {
      inv1 += zero;
      inv3 += one;
      one++;
    }
  }
  if (inv == a10 && inv1 == a01 && inv2 == a00 && inv3 == a11) {
    for (i = 0; i < ans.size(); i++) printf("%c", ans[i]);
    printf("\n");
  } else
    printf("Impossible\n");
}

```