#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007LL;
int n, k;
long long a00, a01, a10, a11;
int main() {
  scanf("%lld%lld%lld%lld", &a00, &a01, &a10, &a11);
  if (a00 == 0 && a11 == 0) {
    if (a10 == 0 && a01 == 0) {
      cout << "1" << endl;
    } else if (a01 && a10) {
      cout << "Impossible" << endl;
    } else {
      if (a10 == 1)
        cout << "10" << endl;
      else if (a01 == 1)
        cout << "01" << endl;
      else
        cout << "Impossible" << endl;
    }
    return 0;
  }
  if (!a00 && a11) {
    long long i;
    for (i = 1; i * (i - 1) / 2 < a11; ++i)
      ;
    if (i * (i - 1) / 2 > a11) {
      cout << "Impossible" << endl;
      return 0;
    }
    if (!a01 && !a10) {
      string ans(i, '1');
      cout << ans << endl;
      return 0;
    } else {
      if (a01 + a10 != i) {
        cout << "Impossible" << endl;
        return 0;
      }
      string ans = string(a10, '1') + "0" + string(a01, '1');
      cout << ans << endl;
      return 0;
    }
  }
  if (a00 && !a11) {
    long long i;
    for (i = 1; i * (i - 1) / 2 < a00; ++i)
      ;
    if (i * (i - 1) / 2 > a00) {
      cout << "Impossible" << endl;
      return 0;
    }
    if (!a01 && !a10) {
      string ans(i, '0');
      cout << ans << endl;
      return 0;
    } else {
      if (a01 + a10 != i) {
        cout << "Impossible" << endl;
        return 0;
      }
      string ans = string(a01, '0') + "1" + string(a10, '0');
      cout << ans << endl;
      return 0;
    }
  }
  long long zn = 0, on = 0;
  long long i;
  for (i = 1; i * (i - 1) / 2 < a00; ++i)
    ;
  if (i * (i - 1) / 2 > a00) {
    cout << "Impossible" << endl;
    return 0;
  }
  zn = i;
  for (i = 1; i * (i - 1) / 2 < a11; ++i)
    ;
  if (i * (i - 1) / 2 > a11) {
    cout << "Impossible" << endl;
    return 0;
  }
  on = i;
  long long tot = zn + on;
  if (tot * (tot - 1) / 2 - a00 - a11 != a01 + a10) {
    cout << "Impossible" << endl;
    return 0;
  }
  long long x = a01;
  vector<pair<int, int> > vs;
  vs.clear();
  int y = zn;
  for (int i = on; i >= 1; --i) {
    long long num = x / i;
    if (num) vs.push_back(make_pair(i, num));
    x -= num * i;
    y -= num;
  }
  if (y) vs.push_back(make_pair(0, y));
  sort(vs.begin(), vs.end());
  string ans = "";
  for (int i = 0; i < vs.size(); ++i) {
    if (i == 0) {
      for (int j = 1; j <= vs[i].first; ++j) {
        ans += "1";
      }
      for (int j = 1; j <= vs[i].second; ++j) {
        ans += "0";
      }
    } else {
      int det = vs[i].first - vs[i - 1].first;
      for (int j = 1; j <= det; ++j) {
        ans += "1";
      }
      for (int j = 1; j <= vs[i].second; ++j) {
        ans += "0";
      }
    }
  }
  if (on > vs.back().first) {
    for (int i = 1; i <= on - vs.back().first; ++i) {
      ans += "1";
    }
  }
  reverse(ans.begin(), ans.end());
  cout << ans << endl;
  return 0;
}
