#include <bits/stdc++.h>
using namespace std;
vector<int> V;
int main() {
  long long int a, b, c, d;
  long long int z, o, oi, io, count = 0;
  cin >> a >> b >> c >> d;
  if (a == 0 && b == 0 && c == 0 && d == 0) {
    cout << 0;
    return 0;
    ;
  }
  long long int sq = (long long int)sqrt((double)1.0 + 8.0 * a);
  if (sq * sq != 1 + 8 * a) {
    cout << "Impossible";
    return 0;
  } else {
    if (a == 0) {
      if (b > 0 || c > 0)
        z = 1;
      else
        z = 0;
    } else {
      if ((1 + sq) % 2 == 1) {
        cout << "Impossible";
        return 0;
      } else {
        z = (1 + sq) / 2;
      }
    }
  }
  sq = (long long int)sqrt((double)1.0 + 8.0 * d);
  if (sq * sq != 1 + 8 * d) {
    cout << "Impossible";
    return 0;
  } else {
    if (d == 0) {
      if (b > 0 || c > 0)
        o = 1;
      else
        o = 0;
    } else {
      if ((1 + sq) % 2 == 1) {
        cout << "Impossible";
        return 0;
      } else {
        o = (1 + sq) / 2;
      }
    }
  }
  oi = o * z;
  if (oi < b) {
    cout << "Impossible";
    return 0;
  }
  io = 0;
  long long int t1;
  count = z;
  long long int i = 0;
  ;
  while (oi > b) {
    t1 = oi - count;
    if (t1 >= b) {
      io = io + count;
      V.push_back(i);
      oi = oi - count;
      i++;
      continue;
    }
    i++;
    count--;
  }
  if (io != c) {
    cout << "Impossible";
    return 0;
  }
  i = 0;
  long long int pos = 0;
  while (z > 0 && o > 0) {
    if (pos >= V.size()) {
      cout << 0;
      i++;
      z--;
    } else {
      if (V[pos] == i) {
        cout << 1;
        pos++;
        i++;
        o--;
      } else {
        cout << 0;
        z--;
        i++;
      }
    }
  }
  while (z > 0) {
    cout << "0";
    z--;
  }
  while (o > 0) {
    cout << 1;
    o--;
  }
}

### 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;
vector<int> V;
int main() {
  long long int a, b, c, d;
  long long int z, o, oi, io, count = 0;
  cin >> a >> b >> c >> d;
  if (a == 0 && b == 0 && c == 0 && d == 0) {
    cout << 0;
    return 0;
    ;
  }
  long long int sq = (long long int)sqrt((double)1.0 + 8.0 * a);
  if (sq * sq != 1 + 8 * a) {
    cout << "Impossible";
    return 0;
  } else {
    if (a == 0) {
      if (b > 0 || c > 0)
        z = 1;
      else
        z = 0;
    } else {
      if ((1 + sq) % 2 == 1) {
        cout << "Impossible";
        return 0;
      } else {
        z = (1 + sq) / 2;
      }
    }
  }
  sq = (long long int)sqrt((double)1.0 + 8.0 * d);
  if (sq * sq != 1 + 8 * d) {
    cout << "Impossible";
    return 0;
  } else {
    if (d == 0) {
      if (b > 0 || c > 0)
        o = 1;
      else
        o = 0;
    } else {
      if ((1 + sq) % 2 == 1) {
        cout << "Impossible";
        return 0;
      } else {
        o = (1 + sq) / 2;
      }
    }
  }
  oi = o * z;
  if (oi < b) {
    cout << "Impossible";
    return 0;
  }
  io = 0;
  long long int t1;
  count = z;
  long long int i = 0;
  ;
  while (oi > b) {
    t1 = oi - count;
    if (t1 >= b) {
      io = io + count;
      V.push_back(i);
      oi = oi - count;
      i++;
      continue;
    }
    i++;
    count--;
  }
  if (io != c) {
    cout << "Impossible";
    return 0;
  }
  i = 0;
  long long int pos = 0;
  while (z > 0 && o > 0) {
    if (pos >= V.size()) {
      cout << 0;
      i++;
      z--;
    } else {
      if (V[pos] == i) {
        cout << 1;
        pos++;
        i++;
        o--;
      } else {
        cout << 0;
        z--;
        i++;
      }
    }
  }
  while (z > 0) {
    cout << "0";
    z--;
  }
  while (o > 0) {
    cout << 1;
    o--;
  }
}

```