#include <bits/stdc++.h>
using namespace std;
long long a00, a10, a01, a11;
int ans[1000010];
int main() {
  scanf("%lld%lld%lld%lld", &a00, &a01, &a10, &a11);
  long long s = 0;
  int i, j;
  long long sq = sqrtl(1 + 8 * a00), n0, n1;
  if (sq * sq != 1 + 8 * a00) {
    printf("Impossible\n");
    return 0;
  }
  n0 = (sq + 1) / 2;
  sq = sqrtl(1 + 8 * a11);
  if (sq * sq != 1 + 8 * a11) {
    printf("Impossible\n");
    return 0;
  }
  n1 = (sq + 1) / 2;
  if (a01 == 0 && a10 == 0) {
    if (n1 != 1 && n0 != 1) {
      printf("Impossible\n");
      return 0;
    } else {
      if (n1 > 1) {
        for (i = 0; i < n1; i++) printf("1");
      } else {
        for (i = 0; i < n0; i++) printf("0");
      }
    }
    return 0;
  }
  if (n1 * n0 != a01 + a10) {
    printf("Impossible\n");
    return 0;
  }
  long long left = n1, zero = a01;
  vector<int> v;
  for (i = 0; i < n1; i++) {
    long long x = min(a01, n0);
    a01 -= x;
    v.push_back(x);
  }
  sort(v.begin(), v.end());
  int count = 0, p = 0;
  for (i = 0; i < n1 + n0; i++) {
    if (p < n1 && count == v[p]) {
      ans[i] = 1;
      p++;
    } else {
      ans[i] = 0;
      count++;
    }
  }
  if (count != n0) {
    printf("Impossible\n");
    return 0;
  }
  for (i = 0; i < n1 + n0; i++) printf("%d", ans[i]);
  return 0;
}
