#include <bits/stdc++.h>
using namespace std;
char s[1000010];
int main() {
  long long zero, one, len, i, j, sum, sum1, sum2;
  long long a00, a01, a10, a11;
  cin >> a00 >> a01 >> a10 >> a11;
  if (a00 == 0 && a01 == 0 && a10 == 0 && a11 == 0) {
    cout << "0" << endl;
    return 0;
  }
  if (a01 == 0 && a10 == 0 && a11 == 0) {
    i = 1;
    sum = 0;
    while (1) {
      sum += i;
      i++;
      if (sum >= a00) break;
    }
    if (sum == a00) {
      while (i--) putchar('0');
      cout << endl;
    } else
      cout << "Impossible" << endl;
    return 0;
  }
  if (a00 == 0 && a01 == 0 && a10 == 0) {
    i = 1;
    sum = 0;
    while (1) {
      sum += i;
      i++;
      if (sum >= a11) break;
    }
    if (sum == a11) {
      while (i--) putchar('1');
      cout << endl;
    } else
      cout << "Impossible" << endl;
    return 0;
  }
  zero = one = -1;
  i = 0;
  sum = 0;
  while (1) {
    sum += i;
    i++;
    if (sum >= a00) break;
  }
  if (sum == a00) zero = i;
  i = 0;
  sum = 0;
  while (1) {
    sum += i;
    i++;
    if (sum >= a11) break;
  }
  if (sum == a11) one = i;
  if (zero == -1 || one == -1) {
    cout << "Impossible" << endl;
    return 0;
  }
  len = zero + one;
  sum1 = len * (len - 1) / 2;
  sum2 = a00 + a01 + a10 + a11;
  if (sum1 != sum2) {
    cout << "Impossible" << endl;
    return 0;
  }
  for (i = 1; i <= len; i++) s[i] = '0';
  j = 0;
  for (i = 1; i <= one; i++) {
    if (a10 <= zero) {
      j++;
      s[i + zero - a10] = '1';
      break;
    }
    j++;
    s[i] = '1';
    a10 -= zero;
  }
  for (i = len; i >= len - one + j + 1; i--) s[i] = '1';
  for (i = 1; i <= len; i++) putchar(s[i]);
  cout << endl;
  return 0;
}

### Prompt

Please create a solution in CPP 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;
char s[1000010];
int main() {
  long long zero, one, len, i, j, sum, sum1, sum2;
  long long a00, a01, a10, a11;
  cin >> a00 >> a01 >> a10 >> a11;
  if (a00 == 0 && a01 == 0 && a10 == 0 && a11 == 0) {
    cout << "0" << endl;
    return 0;
  }
  if (a01 == 0 && a10 == 0 && a11 == 0) {
    i = 1;
    sum = 0;
    while (1) {
      sum += i;
      i++;
      if (sum >= a00) break;
    }
    if (sum == a00) {
      while (i--) putchar('0');
      cout << endl;
    } else
      cout << "Impossible" << endl;
    return 0;
  }
  if (a00 == 0 && a01 == 0 && a10 == 0) {
    i = 1;
    sum = 0;
    while (1) {
      sum += i;
      i++;
      if (sum >= a11) break;
    }
    if (sum == a11) {
      while (i--) putchar('1');
      cout << endl;
    } else
      cout << "Impossible" << endl;
    return 0;
  }
  zero = one = -1;
  i = 0;
  sum = 0;
  while (1) {
    sum += i;
    i++;
    if (sum >= a00) break;
  }
  if (sum == a00) zero = i;
  i = 0;
  sum = 0;
  while (1) {
    sum += i;
    i++;
    if (sum >= a11) break;
  }
  if (sum == a11) one = i;
  if (zero == -1 || one == -1) {
    cout << "Impossible" << endl;
    return 0;
  }
  len = zero + one;
  sum1 = len * (len - 1) / 2;
  sum2 = a00 + a01 + a10 + a11;
  if (sum1 != sum2) {
    cout << "Impossible" << endl;
    return 0;
  }
  for (i = 1; i <= len; i++) s[i] = '0';
  j = 0;
  for (i = 1; i <= one; i++) {
    if (a10 <= zero) {
      j++;
      s[i + zero - a10] = '1';
      break;
    }
    j++;
    s[i] = '1';
    a10 -= zero;
  }
  for (i = len; i >= len - one + j + 1; i--) s[i] = '1';
  for (i = 1; i <= len; i++) putchar(s[i]);
  cout << endl;
  return 0;
}

```