#include <bits/stdc++.h>
using namespace std;
const int MAX_A = 1000000000;
const int MAX_C = 45000;
const int MAX_L = 1000000;
char s[MAX_L + 4];
int findc(int a) {
  int c0 = 0, c1 = MAX_C;
  while (c0 + 1 < c1) {
    int c = (c0 + c1) / 2;
    if (c * (c - 1) / 2 >= a)
      c1 = c;
    else
      c0 = c;
  }
  return (c1 * (c1 - 1) / 2 == a) ? c1 : 0;
}
bool check(int c0, int c1, int a01, int a10) {
  int l = c0 + c1, f0 = 0, f1 = 0, r0 = c0, r1 = c1;
  if (l == 0) return false;
  for (int i = 0; i < l; i++) {
    if (r0 > 0 && r1 <= a01)
      s[i] = '0', f0++, r0--, a01 -= r1;
    else
      s[i] = '1', f1++, r1--, a10 -= r0;
  }
  s[l] = '\0';
  return (a01 == 0 && a10 == 0);
}
int main() {
  int a00, a01, a10, a11;
  scanf("%d%d%d%d", &a00, &a01, &a10, &a11);
  if (a00 > 0 && a11 > 0) {
    int c0 = findc(a00), c1 = findc(a11);
    if (c0 > 0 && c1 > 0 && a01 + a10 == c0 * c1 && check(c0, c1, a01, a10)) {
      puts(s);
      return 0;
    }
  } else if (a00 > 0 && a11 == 0) {
    int c0 = findc(a00);
    if (c0 > 0)
      for (int c1 = 0; c1 <= 1; c1++)
        if (c0 * c1 == a01 + a10 && check(c0, c1, a01, a10)) {
          puts(s);
          return 0;
        }
  } else if (a00 == 0 && a11 > 0) {
    int c1 = findc(a11);
    if (c1 > 0)
      for (int c0 = 0; c0 <= 1; c0++)
        if (c0 * c1 == a01 + a10 && check(c0, c1, a01, a10)) {
          puts(s);
          return 0;
        }
  } else {
    for (int c0 = 0; c0 <= 1; c0++)
      for (int c1 = 0; c1 <= 1; c1++)
        if (c0 * c1 == a01 + a10 && check(c0, c1, a01, a10)) {
          puts(s);
          return 0;
        }
  }
  puts("Impossible");
  return 0;
}

### Prompt

Create a solution in cpp for 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 MAX_A = 1000000000;
const int MAX_C = 45000;
const int MAX_L = 1000000;
char s[MAX_L + 4];
int findc(int a) {
  int c0 = 0, c1 = MAX_C;
  while (c0 + 1 < c1) {
    int c = (c0 + c1) / 2;
    if (c * (c - 1) / 2 >= a)
      c1 = c;
    else
      c0 = c;
  }
  return (c1 * (c1 - 1) / 2 == a) ? c1 : 0;
}
bool check(int c0, int c1, int a01, int a10) {
  int l = c0 + c1, f0 = 0, f1 = 0, r0 = c0, r1 = c1;
  if (l == 0) return false;
  for (int i = 0; i < l; i++) {
    if (r0 > 0 && r1 <= a01)
      s[i] = '0', f0++, r0--, a01 -= r1;
    else
      s[i] = '1', f1++, r1--, a10 -= r0;
  }
  s[l] = '\0';
  return (a01 == 0 && a10 == 0);
}
int main() {
  int a00, a01, a10, a11;
  scanf("%d%d%d%d", &a00, &a01, &a10, &a11);
  if (a00 > 0 && a11 > 0) {
    int c0 = findc(a00), c1 = findc(a11);
    if (c0 > 0 && c1 > 0 && a01 + a10 == c0 * c1 && check(c0, c1, a01, a10)) {
      puts(s);
      return 0;
    }
  } else if (a00 > 0 && a11 == 0) {
    int c0 = findc(a00);
    if (c0 > 0)
      for (int c1 = 0; c1 <= 1; c1++)
        if (c0 * c1 == a01 + a10 && check(c0, c1, a01, a10)) {
          puts(s);
          return 0;
        }
  } else if (a00 == 0 && a11 > 0) {
    int c1 = findc(a11);
    if (c1 > 0)
      for (int c0 = 0; c0 <= 1; c0++)
        if (c0 * c1 == a01 + a10 && check(c0, c1, a01, a10)) {
          puts(s);
          return 0;
        }
  } else {
    for (int c0 = 0; c0 <= 1; c0++)
      for (int c1 = 0; c1 <= 1; c1++)
        if (c0 * c1 == a01 + a10 && check(c0, c1, a01, a10)) {
          puts(s);
          return 0;
        }
  }
  puts("Impossible");
  return 0;
}

```