#include <bits/stdc++.h>
using namespace std;
const double eps = 0.000000000000001;
long long a00, a01, a10, a11;
int A[1000100];
int main() {
  scanf("%lld%lld%lld", &a00, &a01, &a10);
  scanf("%lld", &a11);
  long long d = 8 * a00 + 1;
  int i, j;
  long long sq = sqrtl(d);
  if ((sq + 1) * (sq + 1) == d) sq++;
  if (sq * sq != d || (sq + 1) % 2 != 0) {
    printf("Impossible\n");
    return 0;
  }
  long long n0 = (sq + 1) / 2;
  d = 8 * a11 + 1;
  sq = sqrtl(d);
  if ((sq + 1) * (sq + 1) == d) sq++;
  if (sq * sq != d || (sq + 1) % 2 != 0) {
    printf("Impossible\n");
    return 0;
  }
  long long n1 = (sq + 1) / 2;
  if (a10 == 0 && a01 == 0) {
    if (n1 > 1 && n0 > 1) {
      printf("Impossible\n");
      return 0;
    } else {
      if (n1 == 1) {
        for (i = 0; i < n0; i++) {
          printf("0");
        }
      } else {
        for (i = 0; i < n1; i++) printf("1");
      }
    }
    return 0;
  }
  int n = n0 + n1;
  if (n1 * n0 != a01 + a10) {
    printf("Impossible\n");
    return 0;
  }
  long long p0 = 0, p1 = 0;
  for (i = n - 1; i >= 0; i--) {
    A[i] = 0;
    if (n0 - p0 <= 0 || a10 - (n1 - p1) < 0) {
      A[i] = 1;
      if (n1 - p1 <= 0 || (a01 - (n0 - p0) < 0)) {
        break;
      }
      p1++;
      a01 -= n0 - p0;
    } else {
      A[i] = 0;
      p0++;
      a10 -= (n1 - p1);
    }
  }
  if (a01 != 0 || a10 != 0) {
    printf("Impossible\n");
    return 0;
  }
  for (i = 0; i < n; i++) {
    printf("%d", A[i]);
  }
  printf("\n");
  return 0;
}
