#include <bits/stdc++.h>
using namespace std;
long long a[2][2], n, num0, num1, sum = 0;
int v[1000005];
long long solve(long long s) {
  long long l = -1, r = 1000000007;
  while (r - l > 1) {
    long long g = ((l + r) >> 1);
    if ((g * (g - 1) >> 1) <= s)
      l = g;
    else
      r = g;
  }
  if (((l * (l - 1)) >> 1) != s) {
    cout << "Impossible";
    exit(0);
  }
  return l;
}
void speacial() {
  if (sum == 0) {
    cout << 0;
    exit(0);
  }
  if (a[0][0] == 0) {
    if (a[0][1] == 0 && a[1][0] == 0) {
      if (n != num1)
        cout << "Impossible";
      else
        for (int i = 1; i <= n; i++) cout << 1;
    } else {
      if (n != num1 + 1 || a[0][1] + a[1][0] != num1)
        cout << "Impossible";
      else
        for (int i = 1; i <= n; i++) cout << (i != a[1][0] + 1);
    }
    exit(0);
  }
  if (a[1][1] == 0) {
    if (a[0][1] == 0 && a[1][0] == 0) {
      if (n != num0)
        cout << "Impossible";
      else
        for (int i = 1; i <= n; i++) cout << 0;
    } else {
      if (n != num0 + 1 || a[0][1] + a[1][0] != num0)
        cout << "Impossible";
      else
        for (int i = 1; i <= n; i++) cout << (i == a[0][1] + 1);
    }
    exit(0);
  }
}
void setup() {
  for (int i = 0; i <= 1; i++)
    for (int j = 0; j <= 1; j++) {
      cin >> a[i][j];
      sum += a[i][j];
    }
  n = solve(sum);
  num0 = solve(a[0][0]);
  num1 = solve(a[1][1]);
  speacial();
  long long onezero = num1 * num0;
  long long zeroone = 0;
  if (num0 + num1 != n || onezero < a[1][0]) {
    cout << "Impossible";
    return;
  }
  for (int i = num1; i >= 1; i--) {
    long long bac = min(onezero - a[1][0], num0);
    v[i + bac] = 1;
    onezero -= bac;
    zeroone += bac;
  }
  if (onezero != a[1][0] || zeroone != a[0][1]) {
    cout << "Impossible";
    return;
  }
  for (int i = 1; i <= n; i++) cout << v[i];
}
void xuly() {}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  setup();
  xuly();
  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;
long long a[2][2], n, num0, num1, sum = 0;
int v[1000005];
long long solve(long long s) {
  long long l = -1, r = 1000000007;
  while (r - l > 1) {
    long long g = ((l + r) >> 1);
    if ((g * (g - 1) >> 1) <= s)
      l = g;
    else
      r = g;
  }
  if (((l * (l - 1)) >> 1) != s) {
    cout << "Impossible";
    exit(0);
  }
  return l;
}
void speacial() {
  if (sum == 0) {
    cout << 0;
    exit(0);
  }
  if (a[0][0] == 0) {
    if (a[0][1] == 0 && a[1][0] == 0) {
      if (n != num1)
        cout << "Impossible";
      else
        for (int i = 1; i <= n; i++) cout << 1;
    } else {
      if (n != num1 + 1 || a[0][1] + a[1][0] != num1)
        cout << "Impossible";
      else
        for (int i = 1; i <= n; i++) cout << (i != a[1][0] + 1);
    }
    exit(0);
  }
  if (a[1][1] == 0) {
    if (a[0][1] == 0 && a[1][0] == 0) {
      if (n != num0)
        cout << "Impossible";
      else
        for (int i = 1; i <= n; i++) cout << 0;
    } else {
      if (n != num0 + 1 || a[0][1] + a[1][0] != num0)
        cout << "Impossible";
      else
        for (int i = 1; i <= n; i++) cout << (i == a[0][1] + 1);
    }
    exit(0);
  }
}
void setup() {
  for (int i = 0; i <= 1; i++)
    for (int j = 0; j <= 1; j++) {
      cin >> a[i][j];
      sum += a[i][j];
    }
  n = solve(sum);
  num0 = solve(a[0][0]);
  num1 = solve(a[1][1]);
  speacial();
  long long onezero = num1 * num0;
  long long zeroone = 0;
  if (num0 + num1 != n || onezero < a[1][0]) {
    cout << "Impossible";
    return;
  }
  for (int i = num1; i >= 1; i--) {
    long long bac = min(onezero - a[1][0], num0);
    v[i + bac] = 1;
    onezero -= bac;
    zeroone += bac;
  }
  if (onezero != a[1][0] || zeroone != a[0][1]) {
    cout << "Impossible";
    return;
  }
  for (int i = 1; i <= n; i++) cout << v[i];
}
void xuly() {}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  setup();
  xuly();
  return 0;
}

```