#include <bits/stdc++.h>
using namespace std;
const int inf = int(1e9);
const double eps = 0.0000000001, pi = 3.14159265358979323;
const int maxn = int(2e5 + 100);
vector<vector<int> > g;
bool visited[maxn];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int a[5], o = -1, I = -1, sum = 0;
  for (int i = 1; i <= 4; ++i) cin >> a[i];
  for (int i = -1; i <= int(1e6); ++i) {
    if (i * (i + 1) / 2 == a[1]) o = i + 1, sum += o;
    if (i * (i + 1) / 2 == a[4]) I = i + 1, sum += I;
  }
  if (I == -1 || o == -1) {
    cout << "Impossible";
    return 0;
  }
  long long all = o + I - 1;
  all = 1LL * all * (all + 1) / 2;
  if (a[1] && a[4] && all - a[1] - a[4] != a[2] + a[3]) {
    cout << "Impossible";
    return 0;
  }
  if (!a[2] && !a[3] && !a[4]) I = 0;
  if (!a[1] && !a[2] && !a[3]) o = 0;
  if (!o && !I) {
    cout << 0;
    return 0;
  }
  all = o + I - 1;
  all = 1LL * all * (all + 1) / 2;
  if (all - a[1] - a[4] != a[2] + a[3]) {
    cout << "Impossible";
    return 0;
  }
  int val1 = 0, val2 = 0;
  for (int i = 1; i <= sum; ++i) {
    if (val1 + I <= a[2] && o > 0) {
      cout << "0";
      val1 += I;
      o--;
    } else if (I > 0 && val2 + o <= a[3]) {
      cout << "1";
      val2 += o;
      I--;
    }
  }
  return 0;
}

### Prompt

Construct a Cpp code solution to the problem outlined:

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 inf = int(1e9);
const double eps = 0.0000000001, pi = 3.14159265358979323;
const int maxn = int(2e5 + 100);
vector<vector<int> > g;
bool visited[maxn];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int a[5], o = -1, I = -1, sum = 0;
  for (int i = 1; i <= 4; ++i) cin >> a[i];
  for (int i = -1; i <= int(1e6); ++i) {
    if (i * (i + 1) / 2 == a[1]) o = i + 1, sum += o;
    if (i * (i + 1) / 2 == a[4]) I = i + 1, sum += I;
  }
  if (I == -1 || o == -1) {
    cout << "Impossible";
    return 0;
  }
  long long all = o + I - 1;
  all = 1LL * all * (all + 1) / 2;
  if (a[1] && a[4] && all - a[1] - a[4] != a[2] + a[3]) {
    cout << "Impossible";
    return 0;
  }
  if (!a[2] && !a[3] && !a[4]) I = 0;
  if (!a[1] && !a[2] && !a[3]) o = 0;
  if (!o && !I) {
    cout << 0;
    return 0;
  }
  all = o + I - 1;
  all = 1LL * all * (all + 1) / 2;
  if (all - a[1] - a[4] != a[2] + a[3]) {
    cout << "Impossible";
    return 0;
  }
  int val1 = 0, val2 = 0;
  for (int i = 1; i <= sum; ++i) {
    if (val1 + I <= a[2] && o > 0) {
      cout << "0";
      val1 += I;
      o--;
    } else if (I > 0 && val2 + o <= a[3]) {
      cout << "1";
      val2 += o;
      I--;
    }
  }
  return 0;
}

```