#include <bits/stdc++.h>
using namespace std;
const int size = 1e6 + 1;
long long int fun(long long int a) {
  long long int l = 0, r = 1e8;
  while (l < r) {
    long long int mid = (l + r) / 2;
    long long int x = mid * (mid - 1);
    x /= 2;
    if (x >= a)
      r = mid;
    else
      l = mid + 1;
  }
  return l;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  long long int a, b, c, d;
  cin >> a >> b >> c >> d;
  long long int n = fun(a);
  long long int m = fun(d);
  string ans = "";
  if (n * (n - 1) != 2 * a or m * (m - 1) != 2 * d) {
    cout << "Impossible";
    return 0;
  }
  if (a == 0 and b == 0 and c == 0 and d == 0) {
    cout << "1";
    return 0;
  }
  if (n == 0 and (b != 0 or c != 0)) n = 1;
  if (m == 0 and (b != 0 or c != 0)) m = 1;
  long long int l, r, mid = 0;
  if (n != 0) {
    r = b / n;
    mid = b % n;
  } else
    r = m;
  l = m - r - (mid != 0);
  if (mid == 0) {
    if ((l * n) != c or l < 0) {
      cout << "Impossible";
      return 0;
    }
    while (l--) ans += "1";
    while (n--) ans += "0";
    while (r--) ans += "1";
  } else {
    if ((l * n + n - mid) != c or l < 0) {
      cout << "Impossible";
      return 0;
    }
    while (l--) ans += "1";
    int x = mid;
    while (x--) ans += "0";
    ans += "1";
    x = n - mid;
    while (x--) ans += "0";
    while (r--) ans += "1";
  }
  cout << ans;
  return 0;
}
