#include <bits/stdc++.h>
using namespace std;
long long int A[2][2];
long long int C[2];
long long int n, m, s;
string S;
long long int asd(long long int m) {
  for (long long int i = 0; i < 1010101; ++i) {
    if (i * (i - 1) == 2 * m) return i;
  }
  return -1;
}
string asdfa() {
  if (C[0] == -1 || C[1] == -1 || n == -1 || n != C[0] + C[1] || n == 0 ||
      A[0][1] + A[1][0] != C[0] * C[1]) {
    return string();
  }
  m = C[1];
  s = A[0][1] + m * (m - 1) / 2;
  S.resize(n, '0');
  if (m != 0) {
    long long int a = m;
    long long int b = n;
    long long int t = m * (m - 1) / 2;
    while (a) {
      if (t + b - a > s) break;
      t += b - a;
      --a;
      --b;
    }
    long long int x = -1;
    if (t < s) {
      long long int d = s - t;
      if (a == 0 || a - 1 + d >= b) {
        return string();
      }
      x = a - 1 + d;
      --a;
    }
    for (long long int i = 0; i < n; ++i) {
      if (i < a || i >= b || i == x) S[i] = '1';
    }
  }
  return S;
}
int main() {
  cin.sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> A[0][0] >> A[0][1] >> A[1][0] >> A[1][1];
  C[0] = asd(A[0][0]);
  C[1] = asd(A[1][1]);
  n = asd(A[0][0] + A[0][1] + A[1][0] + A[1][1]);
  long long int minC[2];
  long long int maxC[2];
  long long int minN = n;
  long long int maxN = n;
  minC[0] = C[0];
  maxC[0] = C[0];
  minC[1] = C[1];
  maxC[1] = C[1];
  if (maxC[0] == 0) ++maxC[0];
  if (maxC[1] == 0) ++maxC[1];
  if (maxN == 0) ++maxN;
  string S;
  for (n = minN; n <= maxN; ++n) {
    for (C[0] = minC[0]; C[0] <= maxC[0]; ++C[0]) {
      for (C[1] = minC[1]; C[1] <= maxC[1]; ++C[1]) {
        string X = asdfa();
        if (!X.empty()) S = X;
      }
    }
  }
  if (S.empty()) {
    cout << "Impossible\n";
  } else {
    cout << S << '\n';
  }
  return 0;
}

### 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;
long long int A[2][2];
long long int C[2];
long long int n, m, s;
string S;
long long int asd(long long int m) {
  for (long long int i = 0; i < 1010101; ++i) {
    if (i * (i - 1) == 2 * m) return i;
  }
  return -1;
}
string asdfa() {
  if (C[0] == -1 || C[1] == -1 || n == -1 || n != C[0] + C[1] || n == 0 ||
      A[0][1] + A[1][0] != C[0] * C[1]) {
    return string();
  }
  m = C[1];
  s = A[0][1] + m * (m - 1) / 2;
  S.resize(n, '0');
  if (m != 0) {
    long long int a = m;
    long long int b = n;
    long long int t = m * (m - 1) / 2;
    while (a) {
      if (t + b - a > s) break;
      t += b - a;
      --a;
      --b;
    }
    long long int x = -1;
    if (t < s) {
      long long int d = s - t;
      if (a == 0 || a - 1 + d >= b) {
        return string();
      }
      x = a - 1 + d;
      --a;
    }
    for (long long int i = 0; i < n; ++i) {
      if (i < a || i >= b || i == x) S[i] = '1';
    }
  }
  return S;
}
int main() {
  cin.sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> A[0][0] >> A[0][1] >> A[1][0] >> A[1][1];
  C[0] = asd(A[0][0]);
  C[1] = asd(A[1][1]);
  n = asd(A[0][0] + A[0][1] + A[1][0] + A[1][1]);
  long long int minC[2];
  long long int maxC[2];
  long long int minN = n;
  long long int maxN = n;
  minC[0] = C[0];
  maxC[0] = C[0];
  minC[1] = C[1];
  maxC[1] = C[1];
  if (maxC[0] == 0) ++maxC[0];
  if (maxC[1] == 0) ++maxC[1];
  if (maxN == 0) ++maxN;
  string S;
  for (n = minN; n <= maxN; ++n) {
    for (C[0] = minC[0]; C[0] <= maxC[0]; ++C[0]) {
      for (C[1] = minC[1]; C[1] <= maxC[1]; ++C[1]) {
        string X = asdfa();
        if (!X.empty()) S = X;
      }
    }
  }
  if (S.empty()) {
    cout << "Impossible\n";
  } else {
    cout << S << '\n';
  }
  return 0;
}

```