#include <bits/stdc++.h>
using namespace std;
bool isWhole(double x) { return (x - (int)x) == 0 ? true : false; }
int main() {
  long long s00, s01, s10, s11;
  cin >> s00 >> s01 >> s10 >> s11;
  double x1, y1, x2, y2;
  int x, y;
  if (s01 == 0 && s10 == 0 && s00 == 0 && s11 == 0) {
    cout << "0" << endl;
    return 0;
  }
  x1 = (1 + sqrt(1 + 4 * s00 * 2)) / 2;
  y1 = (1 + sqrt(1 + 4 * s11 * 2)) / 2;
  x2 = (1 - sqrt(1 + 4 * s00 * 2)) / 2;
  y2 = (1 - sqrt(1 + 4 * s11 * 2)) / 2;
  if ((x1 > 1 && y1 > 1) && (x1 * y1) != (s10 + s01)) {
    cout << "Impossible" << endl;
    return 0;
  } else {
    if ((isWhole(x1) && isWhole(y1)) && (x1 * y1) == (s10 + s01)) {
      x = x1;
      y = y1;
    } else if ((isWhole(x1) && isWhole(y2)) && (x1 * y2) == (s10 + s01)) {
      x = x1;
      y = y2;
    } else if ((isWhole(x2) && isWhole(y1)) && (x2 * y1) == (s10 + s01)) {
      x = x2;
      y = y1;
    } else if ((isWhole(x2) && isWhole(y2)) && (x2 * y2) == (s10 + s01)) {
      x = x2;
      y = y2;
    } else {
      cout << "Impossible" << endl;
      return 0;
    }
  }
  if (x == 0) {
    string ans(y, '1');
    cout << ans << endl;
    return 0;
  }
  if (y == 0) {
    string ans(x, '0');
    cout << ans << endl;
    return 0;
  }
  vector<long long> num(y);
  for (long long i = 0; i < num.size(); i++) {
    num[i] = 0;
  }
  long long sum = 0;
  if (s01 >= y) {
    long long n0 = s01 / y;
    sum = n0 * y;
    for (long long i = 0; i < num.size(); i++) {
      num[i] = n0;
    }
  }
  int t = num.size() - 1;
  while (sum != s01 && t > 0) {
    num[t]++;
    sum++;
    t--;
  }
  string ans(y, '1');
  long long prev = 0;
  for (int i = 0; i < num.size(); i++) {
    if (num[i] > prev) {
      string temp(num[i] - prev, '0');
      ans.insert(i + prev, temp);
      prev = num[i];
    }
  }
  if (num[num.size() - 1] < x) {
    string temp(x - num[num.size() - 1], '0');
    ans.insert(ans.size(), temp);
  }
  cout << ans << endl;
}

### Prompt

In Cpp, your task is to solve 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;
bool isWhole(double x) { return (x - (int)x) == 0 ? true : false; }
int main() {
  long long s00, s01, s10, s11;
  cin >> s00 >> s01 >> s10 >> s11;
  double x1, y1, x2, y2;
  int x, y;
  if (s01 == 0 && s10 == 0 && s00 == 0 && s11 == 0) {
    cout << "0" << endl;
    return 0;
  }
  x1 = (1 + sqrt(1 + 4 * s00 * 2)) / 2;
  y1 = (1 + sqrt(1 + 4 * s11 * 2)) / 2;
  x2 = (1 - sqrt(1 + 4 * s00 * 2)) / 2;
  y2 = (1 - sqrt(1 + 4 * s11 * 2)) / 2;
  if ((x1 > 1 && y1 > 1) && (x1 * y1) != (s10 + s01)) {
    cout << "Impossible" << endl;
    return 0;
  } else {
    if ((isWhole(x1) && isWhole(y1)) && (x1 * y1) == (s10 + s01)) {
      x = x1;
      y = y1;
    } else if ((isWhole(x1) && isWhole(y2)) && (x1 * y2) == (s10 + s01)) {
      x = x1;
      y = y2;
    } else if ((isWhole(x2) && isWhole(y1)) && (x2 * y1) == (s10 + s01)) {
      x = x2;
      y = y1;
    } else if ((isWhole(x2) && isWhole(y2)) && (x2 * y2) == (s10 + s01)) {
      x = x2;
      y = y2;
    } else {
      cout << "Impossible" << endl;
      return 0;
    }
  }
  if (x == 0) {
    string ans(y, '1');
    cout << ans << endl;
    return 0;
  }
  if (y == 0) {
    string ans(x, '0');
    cout << ans << endl;
    return 0;
  }
  vector<long long> num(y);
  for (long long i = 0; i < num.size(); i++) {
    num[i] = 0;
  }
  long long sum = 0;
  if (s01 >= y) {
    long long n0 = s01 / y;
    sum = n0 * y;
    for (long long i = 0; i < num.size(); i++) {
      num[i] = n0;
    }
  }
  int t = num.size() - 1;
  while (sum != s01 && t > 0) {
    num[t]++;
    sum++;
    t--;
  }
  string ans(y, '1');
  long long prev = 0;
  for (int i = 0; i < num.size(); i++) {
    if (num[i] > prev) {
      string temp(num[i] - prev, '0');
      ans.insert(i + prev, temp);
      prev = num[i];
    }
  }
  if (num[num.size() - 1] < x) {
    string temp(x - num[num.size() - 1], '0');
    ans.insert(ans.size(), temp);
  }
  cout << ans << endl;
}

```