#include <bits/stdc++.h>
using namespace std;
int const oo = 1e9, bound = 1e6 + 2, mod = oo + 7, N = 6e5 + 2;
long long const OO = 1e18;
int a, b, c, d;
map<long long, int> mp;
void precalc() {
  for (int i = 0; i <= N; i++) mp[1LL * i * (i + 1) / 2] = i + 1;
}
int main() {
  precalc();
  cin >> a >> b >> c >> d;
  if (!a && !b && !c && !d) {
    cout << 0 << endl;
    return 0;
  }
  if (mp.find(a) == mp.end() || mp.find(d) == mp.end()) {
    cout << "Impossible\n";
    return 0;
  }
  int sa = mp[a], sd = mp[d];
  if (sa == 1 && !c && !b) {
    for (int(i) = 0; (i) < (sd); (i)++) cout << 1;
    return 0;
  }
  if (sd == 1 && !c && !b) {
    for (int(i) = 0; (i) < (sa); (i)++) cout << 0;
    return 0;
  }
  if (sa == 1 && sd == 1) {
    if (c == 0 && b == 1) {
      cout << "01";
    } else if (b == 0 && c == 1) {
      cout << "10";
    } else
      cout << "Impossible\n";
    return 0;
  }
  int l = 0, r = sa, mid, res = 0;
  while (l <= r) {
    mid = (l + r) >> 1;
    if (mid * sd >= b) {
      res = mid;
      r = mid - 1;
    } else
      l = mid + 1;
  }
  if (res * sd == b && sd * (sa - res) == c) {
    for (int(i) = 0; (i) < (res); (i)++) cout << 0;
    for (int(i) = 0; (i) < (sd); (i)++) cout << 1;
    for (int(i) = 0; (i) < (sa - res); (i)++) cout << 0;
    return 0;
  }
  int rem = sd - 1;
  while (rem > 0) {
    if ((res - 1) * sd + rem == b &&
        (sd - rem) * (sa - res + 1) + rem * (sa - res) == c) {
      for (int(i) = 0; (i) < (res - 1); (i)++) cout << 0;
      for (int(i) = 0; (i) < (sd - rem); (i)++) cout << 1;
      cout << 0;
      for (int(i) = 0; (i) < (rem); (i)++) cout << 1;
      for (int(i) = 0; (i) < (sa - res); (i)++) cout << 0;
      return 0;
    }
    rem--;
  }
  l = 0, r = sd, res = 0;
  while (l <= r) {
    mid = (l + r) >> 1;
    if (mid * sa >= c) {
      res = mid;
      r = mid - 1;
    } else
      l = mid + 1;
  }
  if (res * sa == c && sa * (sd - res) == b) {
    for (int(i) = 0; (i) < (res); (i)++) cout << 1;
    for (int(i) = 0; (i) < (sa); (i)++) cout << 0;
    for (int(i) = 0; (i) < (sd - res); (i)++) cout << 1;
    return 0;
  }
  rem = sa;
  while (rem > 0) {
    if ((res - 1) * sa + rem == c &&
        (sa - rem) * (sd - res + 1) + rem * (sa - res) == b) {
      for (int(i) = 0; (i) < (res - 1); (i)++) cout << 1;
      for (int(i) = 0; (i) < (sa - rem); (i)++) cout << 0;
      cout << 1;
      for (int(i) = 0; (i) < (rem); (i)++) cout << 0;
      for (int(i) = 0; (i) < (sd - res); (i)++) cout << 1;
      return 0;
    }
    rem--;
  }
  cout << "Impossible\n";
  return 0;
}
