#include <bits/stdc++.h>
using namespace std;
long long c0, c1, a00, a01, a10, a11;
int pierw(long long a) {
  long long delta = 1 + 8 * a;
  double s = sqrt((double)delta);
  if ((s * s) != delta) return -1;
  return (1 + s) / 2;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  cin >> a00 >> a01 >> a10 >> a11;
  c0 = pierw(a00);
  c1 = pierw(a11);
  if (c0 == -1 || c1 == -1) {
    cout << "Impossible\n";
    return 0;
  }
  if (a00 + a01 + a10 + a11 == 0) {
    cout << "0\n";
    return 0;
  }
  if (a00 * a11 == 0)
    if (a01 + a10 == 0) {
      if (c0 == 1) c0 = 0;
      if (c1 == 1) c1 = 0;
      cout << string(c0, '0') << string(c1, '1');
      return 0;
    }
  if (a01 + a10 != c0 * c1) {
    cout << "Impossible\n";
    return 0;
  }
  string s = string(c0, '0') + string(c1, '1');
  long long end = s.size() - 1, first_zero = c0 - 1;
  long long b01 = c0 * c1;
  while (b01 - a01 >= c1) {
    s[first_zero--] = '1';
    s[end--] = '0';
    b01 -= c1;
  }
  if (b01 > 0) {
    s[first_zero] = '1';
    s[first_zero + b01 - a01] = '0';
  }
  cout << s << '\n';
  return 0;
}
