#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 22;
int n, a, b, c, d, t0, t1, cnt;
char res[MAXN];
int f(int x) {
  for (__typeof(1e5) i = (0) - ((0) > (1e5)); i != (1e5) - ((0) > (1e5));
       i += 1 - 2 * ((0) > (1e5))) {
    if (i * (i - 1) > 2 * x) {
      cout << "Impossible";
      exit(0);
    }
    if (i * (i - 1) == 2 * x) return i;
  }
}
int main() {
  cin >> a >> b >> c >> d;
  t0 = f(a), t1 = f(d);
  n = t0 + t1;
  if (n == 0 && b == 0 && c == 0) return cout << "0" << endl, 0;
  if (t0 == 0 || t1 == 0) {
    if (c == 0 && b == 0)
      22;
    else
      t0 += (t0 == 0), t1 += (t1 == 0);
  }
  n = t0 + t1;
  if (t0 * t1 != b + c) return cout << "Impossible", 0;
  while (c >= t0 && c > 0) {
    c -= t0;
    res[cnt++] = '1';
    t1--;
  }
  if (c > 0) {
    int r = t0 - c;
    while (r--) res[cnt++] = '0', t0--;
    res[cnt++] = '1';
    t1--;
  }
  while (t0 > 0) {
    res[cnt++] = '0';
    t0--;
  }
  while (t1 > 0) {
    res[cnt++] = '1';
    t1--;
  }
  if (t1 == 0 && t0 == 0 && cnt == n) {
    for (__typeof(n) i = (0) - ((0) > (n)); i != (n) - ((0) > (n));
         i += 1 - 2 * ((0) > (n)))
      cout << res[i];
  } else {
    cout << "Impossible";
  }
  return 0;
}

### Prompt

Please formulate 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 MAXN = 1e5 + 22;
int n, a, b, c, d, t0, t1, cnt;
char res[MAXN];
int f(int x) {
  for (__typeof(1e5) i = (0) - ((0) > (1e5)); i != (1e5) - ((0) > (1e5));
       i += 1 - 2 * ((0) > (1e5))) {
    if (i * (i - 1) > 2 * x) {
      cout << "Impossible";
      exit(0);
    }
    if (i * (i - 1) == 2 * x) return i;
  }
}
int main() {
  cin >> a >> b >> c >> d;
  t0 = f(a), t1 = f(d);
  n = t0 + t1;
  if (n == 0 && b == 0 && c == 0) return cout << "0" << endl, 0;
  if (t0 == 0 || t1 == 0) {
    if (c == 0 && b == 0)
      22;
    else
      t0 += (t0 == 0), t1 += (t1 == 0);
  }
  n = t0 + t1;
  if (t0 * t1 != b + c) return cout << "Impossible", 0;
  while (c >= t0 && c > 0) {
    c -= t0;
    res[cnt++] = '1';
    t1--;
  }
  if (c > 0) {
    int r = t0 - c;
    while (r--) res[cnt++] = '0', t0--;
    res[cnt++] = '1';
    t1--;
  }
  while (t0 > 0) {
    res[cnt++] = '0';
    t0--;
  }
  while (t1 > 0) {
    res[cnt++] = '1';
    t1--;
  }
  if (t1 == 0 && t0 == 0 && cnt == n) {
    for (__typeof(n) i = (0) - ((0) > (n)); i != (n) - ((0) > (n));
         i += 1 - 2 * ((0) > (n)))
      cout << res[i];
  } else {
    cout << "Impossible";
  }
  return 0;
}

```