#include <bits/stdc++.h>
using namespace std;
const long double PI = 3.141592653589793238462643383279502884L;
const long double E = 2.718281828459045235360287471352662498L;
const long double EPS = 1e-12L;
int n, n0, n1;
int64_t s;
bool ok;
int64_t a[2][2];
int md[800000];
string ss = "";
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.precision(11);
  cout.setf(ios::fixed);
  cin >> a[0][0] >> a[0][1] >> a[1][0] >> a[1][1];
  s = a[0][0] + a[0][1] + a[1][0] + a[1][1];
  if (s == 0) {
    cout << 0 << endl;
    return 0;
  }
  ok = false;
  for (int64_t i = 1; i < 400000; ++i) {
    if (i * (i + 1) == 2L * s) {
      n = i + 1;
      ok = true;
      break;
    }
  }
  if (ok && s == a[0][0]) {
    for (int i = 0; i < n; ++i) {
      cout << 0;
    }
    cout << endl;
    return 0;
  }
  if (ok && s == a[1][1]) {
    for (int i = 0; i < n; ++i) {
      cout << 1;
    }
    cout << endl;
    return 0;
  }
  if (ok) {
    ok = false;
    for (int64_t i = 0; i < 400000; ++i) {
      if (i * (i + 1) == 2L * a[0][0]) {
        n0 = i + 1;
        ok = true;
        break;
      }
    }
    if (!ok) {
      cout << "Impossible\n";
      return 0;
    }
    ok = false;
    for (int64_t i = 0; i < 400000; ++i) {
      if (i * (i + 1) == 2L * a[1][1]) {
        n1 = i + 1;
        ok = true;
        break;
      }
    }
    if (!ok) {
      cout << "Impossible\n";
      return 0;
    }
    ok = false;
    if (n0 + n1 != n) {
      cout << "Impossible\n";
      return 0;
    }
    int64_t t = a[1][0];
    for (int j = n1; j >= 1; --j) {
      md[j] = t / j;
      t = t - md[j] * j;
    }
    int k = 0;
    for (int j = n1; j >= 1 && k < n; --j) {
      for (int i = 0; i < md[j] && k < n; ++i) {
        ss += '0';
        ++k;
      }
      ss += '1';
      ++k;
    }
    for (; k < n; ++k) {
      ss += '0';
    }
    reverse(ss.begin(), ss.end());
    cout << ss << endl;
  } else {
    cout << "Impossible\n";
  }
  return 0;
}
