#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long int lcm(long long int a, long long int b) {
  return b * a / gcd(a, b);
}
long long int abs1(long long int a) {
  if (a < 0)
    return -1 * a;
  else
    return a;
}
long long int max(long long int a, long long int b) {
  if (a > b) return a;
  return b;
}
long long int fast_pow(long long base, long long n) {
  if (n == 0) return 1;
  if (n == 1) return base;
  long long halfn = fast_pow(base, n / 2);
  if (n % 2 == 0)
    return (halfn * halfn);
  else
    return (((halfn * halfn)) * base);
}
long long int findMMI_fermat(long long int n, long long int M) {
  return fast_pow(n, M - 2);
}
const double PI = 3.14159265358979323846;
int main() {
  double a, b, c, d;
  cin >> a >> b >> c >> d;
  if (a == 0 && b == 0 && c == 0 && d == 0) {
    cout << "0";
    return 0;
  }
  double k = (1 + sqrt(1 + 8 * a)) / 2;
  if (k - (int)k != 0) {
    cout << "Impossible";
    return 0;
  }
  double tt = b + c;
  double l = tt / k;
  if (a == 0 && b == 0 && c == 0) k = 0;
  if (l - (int)l != 0) {
    cout << "Impossible";
    return 0;
  }
  long long int p = (l * (l - 1)) / 2;
  if (p != d && (b != 0 || c != 0 || a != 0)) {
    cout << "Impossible";
    return 0;
  }
  if (b == 0 && a == 0 && c == 0) {
    l = (1 + sqrt(1 + 8 * d)) / 2;
    if (l - (int)l != 0) {
      cout << "Impossible";
      return 0;
    }
    if (d == 0 && c == 0 && b == 0) l = 0;
  }
  string t;
  int aa = k;
  int dd = l;
  for (int i = 0; i < k; i++) t += "0";
  int r = c / (k > 1 ? k : 1);
  for (int j = 0; j < r; j++) {
    t += "1";
  }
  dd -= r;
  reverse(t.begin(), t.end());
  if (k == 0) k = 1;
  r = (int)c % (int)k;
  if (r != 0) dd--;
  for (int i = 0; i < dd; i++) t += "1";
  int pp = k - r;
  int count = 0;
  for (int i = 0; i < t.length(); i++) {
    if (t[i] == '0') {
      count++;
    }
    cout << t[i];
    if (count == pp && r != 0) {
      cout << "1";
      count++;
    }
  }
  return 0;
}

### Prompt

Generate a CPP solution 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;
long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long int lcm(long long int a, long long int b) {
  return b * a / gcd(a, b);
}
long long int abs1(long long int a) {
  if (a < 0)
    return -1 * a;
  else
    return a;
}
long long int max(long long int a, long long int b) {
  if (a > b) return a;
  return b;
}
long long int fast_pow(long long base, long long n) {
  if (n == 0) return 1;
  if (n == 1) return base;
  long long halfn = fast_pow(base, n / 2);
  if (n % 2 == 0)
    return (halfn * halfn);
  else
    return (((halfn * halfn)) * base);
}
long long int findMMI_fermat(long long int n, long long int M) {
  return fast_pow(n, M - 2);
}
const double PI = 3.14159265358979323846;
int main() {
  double a, b, c, d;
  cin >> a >> b >> c >> d;
  if (a == 0 && b == 0 && c == 0 && d == 0) {
    cout << "0";
    return 0;
  }
  double k = (1 + sqrt(1 + 8 * a)) / 2;
  if (k - (int)k != 0) {
    cout << "Impossible";
    return 0;
  }
  double tt = b + c;
  double l = tt / k;
  if (a == 0 && b == 0 && c == 0) k = 0;
  if (l - (int)l != 0) {
    cout << "Impossible";
    return 0;
  }
  long long int p = (l * (l - 1)) / 2;
  if (p != d && (b != 0 || c != 0 || a != 0)) {
    cout << "Impossible";
    return 0;
  }
  if (b == 0 && a == 0 && c == 0) {
    l = (1 + sqrt(1 + 8 * d)) / 2;
    if (l - (int)l != 0) {
      cout << "Impossible";
      return 0;
    }
    if (d == 0 && c == 0 && b == 0) l = 0;
  }
  string t;
  int aa = k;
  int dd = l;
  for (int i = 0; i < k; i++) t += "0";
  int r = c / (k > 1 ? k : 1);
  for (int j = 0; j < r; j++) {
    t += "1";
  }
  dd -= r;
  reverse(t.begin(), t.end());
  if (k == 0) k = 1;
  r = (int)c % (int)k;
  if (r != 0) dd--;
  for (int i = 0; i < dd; i++) t += "1";
  int pp = k - r;
  int count = 0;
  for (int i = 0; i < t.length(); i++) {
    if (t[i] == '0') {
      count++;
    }
    cout << t[i];
    if (count == pp && r != 0) {
      cout << "1";
      count++;
    }
  }
  return 0;
}

```