#include <bits/stdc++.h>
using namespace std;
bool check(int a, int b, int c, int d, int z, int o) {
  if ((z * (z - 1) / 2) != a) return false;
  if ((o * (o - 1) / 2) != d) return false;
  if (b + c != z * o) return false;
  return true;
}
string findstr(int a, int b, int c, int d, int z, int o) {
  string s = "";
  while (o > 0) {
    if (b >= o) {
      s += "0";
      b -= o;
      z--;
    } else {
      s += "1";
      o--;
    }
  }
  while (z > 0) {
    s += "0";
    z--;
  }
  return s;
}
int main() {
  long long int a, b, c, d, z, o;
  cin >> a >> b >> c >> d;
  z = (1 + sqrt(1 + 8 * a)) / 2;
  o = (1 + sqrt(1 + 8 * d)) / 2;
  if (a == 0) {
    if (check(a, b, c, d, 0, o)) {
      cout << findstr(a, b, c, d, 0, o) << endl;
      return 0;
    }
    if (check(a, b, c, d, 1, o)) {
      cout << findstr(a, b, c, d, 1, o) << endl;
      return 0;
    }
    cout << "Impossible" << endl;
    return 0;
  }
  if (d == 0) {
    if (check(a, b, c, d, z, 0)) {
      cout << findstr(a, b, c, d, z, 0) << endl;
      return 0;
    }
    if (check(a, b, c, d, z, 1)) {
      cout << findstr(a, b, c, d, z, 1) << endl;
      return 0;
    }
    cout << "Impossible" << endl;
    return 0;
  }
  if (check(a, b, c, d, z, o)) {
    cout << findstr(a, b, c, d, z, o) << endl;
    return 0;
  }
  cout << "Impossible" << endl;
  return 0;
}
