#include <bits/stdc++.h>
using namespace std;
template <class T, class S>
ostream& operator<<(ostream& os, const pair<T, S>& v) {
  return os << "(" << v.first << ", " << v.second << ")";
}
template <class T>
ostream& operator<<(ostream& os, const vector<T>& v) {
  os << "[";
  for (int i = int(0); i <= int((static_cast<int>((v).size())) - 1); ++i) {
    if (i) os << ", ";
    os << v[i];
  }
  return os << "]";
}
template <class T>
bool setmax(T& _a, T _b) {
  if (_b > _a) {
    _a = _b;
    return true;
  }
  return false;
}
template <class T>
bool setmin(T& _a, T _b) {
  if (_b < _a) {
    _a = _b;
    return true;
  }
  return false;
}
template <class T>
T gcd(T _a, T _b) {
  return _b == 0 ? _a : gcd(_b, _a % _b);
}
long long c2(long long n) { return n * (n - 1) / 2; }
string solve(long long n0, long long n1, long long a01, long long a10) {
  if (a01 + a10 != n0 * n1) return "";
  string s = "";
  while (n0 > 0 || n1 > 0) {
    if (n0 > 0 && a01 >= n1) {
      a01 -= n1, --n0;
      s += '0';
    } else {
      assert(n1 > 0 && a10 >= n0);
      a10 -= n0, --n1;
      s += '1';
    }
  }
  return s;
}
string solve() {
  long long a00, a01, a10, a11;
  cin >> a00 >> a01 >> a10 >> a11;
  long long n0_l, n0_r;
  if (a00 == 0)
    n0_l = 0, n0_r = 1;
  else {
    long long n0 = 0;
    while (c2(n0) < a00) ++n0;
    if (c2(n0) != a00) return "";
    n0_l = n0_r = n0;
  }
  long long n1_l, n1_r;
  if (a11 == 0)
    n1_l = 0, n1_r = 1;
  else {
    long long n1 = 0;
    while (c2(n1) < a11) ++n1;
    if (c2(n1) != a11) return "";
    n1_l = n1_r = n1;
  }
  for (int n0 = int(n0_l); n0 <= int(n0_r); ++n0)
    for (int n1 = int(n1_l); n1 <= int(n1_r); ++n1) {
      auto s = solve(n0, n1, a01, a10);
      if (!s.empty()) return s;
    }
  return "";
}
int main() {
  string s = solve();
  if (s.empty()) s = "Impossible";
  cout << s << endl;
  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;
template <class T, class S>
ostream& operator<<(ostream& os, const pair<T, S>& v) {
  return os << "(" << v.first << ", " << v.second << ")";
}
template <class T>
ostream& operator<<(ostream& os, const vector<T>& v) {
  os << "[";
  for (int i = int(0); i <= int((static_cast<int>((v).size())) - 1); ++i) {
    if (i) os << ", ";
    os << v[i];
  }
  return os << "]";
}
template <class T>
bool setmax(T& _a, T _b) {
  if (_b > _a) {
    _a = _b;
    return true;
  }
  return false;
}
template <class T>
bool setmin(T& _a, T _b) {
  if (_b < _a) {
    _a = _b;
    return true;
  }
  return false;
}
template <class T>
T gcd(T _a, T _b) {
  return _b == 0 ? _a : gcd(_b, _a % _b);
}
long long c2(long long n) { return n * (n - 1) / 2; }
string solve(long long n0, long long n1, long long a01, long long a10) {
  if (a01 + a10 != n0 * n1) return "";
  string s = "";
  while (n0 > 0 || n1 > 0) {
    if (n0 > 0 && a01 >= n1) {
      a01 -= n1, --n0;
      s += '0';
    } else {
      assert(n1 > 0 && a10 >= n0);
      a10 -= n0, --n1;
      s += '1';
    }
  }
  return s;
}
string solve() {
  long long a00, a01, a10, a11;
  cin >> a00 >> a01 >> a10 >> a11;
  long long n0_l, n0_r;
  if (a00 == 0)
    n0_l = 0, n0_r = 1;
  else {
    long long n0 = 0;
    while (c2(n0) < a00) ++n0;
    if (c2(n0) != a00) return "";
    n0_l = n0_r = n0;
  }
  long long n1_l, n1_r;
  if (a11 == 0)
    n1_l = 0, n1_r = 1;
  else {
    long long n1 = 0;
    while (c2(n1) < a11) ++n1;
    if (c2(n1) != a11) return "";
    n1_l = n1_r = n1;
  }
  for (int n0 = int(n0_l); n0 <= int(n0_r); ++n0)
    for (int n1 = int(n1_l); n1 <= int(n1_r); ++n1) {
      auto s = solve(n0, n1, a01, a10);
      if (!s.empty()) return s;
    }
  return "";
}
int main() {
  string s = solve();
  if (s.empty()) s = "Impossible";
  cout << s << endl;
  return 0;
}

```