#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pll = pair<ll, ll>;
void fail() {
  cout << "Impossible" << endl;
  exit(0);
}
ll triangle(ll n) {
  ll k = 1, t = 0;
  while (t < n) t += k++;
  return t == n ? k : -1;
}
int main() {
  ios_base::sync_with_stdio(false);
  cout << setprecision(12);
  cin.tie(nullptr);
  ll a00, a01, a10, a11;
  cin >> a00 >> a01 >> a10 >> a11;
  ll z = triangle(a00);
  ll e = triangle(a11);
  if (z == -1 || e == -1) fail();
  if (a00 == 0 && a01 == 0 && a10 == 0 && a11 == 0) {
    cout << "1" << endl;
    return 0;
  }
  if (a00 > 0 && a01 == 0 && a10 == 0 && a11 == 0) {
    cout << string(z, '0') << endl;
    return 0;
  }
  if (a00 == 0 && a01 == 0 && a10 == 0 && a11 > 0) {
    cout << string(e, '1') << endl;
    return 0;
  }
  if (a01 + a10 != z * e) fail();
  string s;
  for (int i = 0; i < int(a10 / z); i++) s.push_back('1');
  for (int i = 0; i < int(z); i++) {
    if (a10 % z && z - i == a10 % z) s.push_back('1');
    s.push_back('0');
  }
  while ((int)s.size() < z + e) s.push_back('1');
  cout << s << endl;
}
