#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:102400000,102400000")
using namespace std;
long long n, a00, a01, a11, a10, c0, c1, l, sum, mx, s[110000], num;
bool make() {
  if (c0 * (c0 - 1) / 2 != a00) return 0;
  if (c1 * (c1 - 1) / 2 != a11) return 0;
  l = c0 + c1;
  sum = l * (l - 1) / 2;
  mx = c0 * c1;
  if (sum != a00 + a01 + a10 + a11 || a01 > mx || a10 > mx) return 0;
  long long now = c0 * c1;
  for (int i = 1; i <= l; i++) s[i] = 0;
  for (long long i = l; i; i--) {
    if (now - c1 > a01) {
      now -= c1;
      continue;
    }
    long long k = now - a01;
    long long g = c1 - k;
    for (long long j = 0; j < g; j++) s[i - j] = 1;
    s[i - g] = 0;
    for (long long j = 0; j < k; j++) s[i - g - 1 - j] = 1;
    break;
  }
  num = l;
  return 1;
}
int main() {
  scanf("%I64d%I64d%I64d%I64d", &a00, &a01, &a10, &a11);
  c0 = sqrt(a00 * 2);
  if (c0 * c0 < a00 * 2) c0++;
  c1 = sqrt(a11 * 2);
  if (c1 * c1 < a11 * 2) c1++;
  bool bo = 0;
  bo |= make();
  if (a00 == 0 && a11 == 0) {
    c0 = 0;
    c1 = 0;
    bo |= make();
    c0 = 1;
    c1 = 0;
    bo |= make();
    c0 = 0;
    c1 = 1;
    bo |= make();
    c0 = 1;
    c1 = 1;
    bo |= make();
  } else if (a00 == 0) {
    c0 = 0;
    bo |= make();
    c0 = 1;
    bo |= make();
  } else if (a11 == 0) {
    c1 = 0;
    bo |= make();
    c1 = 1;
    bo |= make();
  }
  if (bo)
    for (long long i = 1; i <= num; i++) printf("%I64d", s[i]);
  else
    printf("Impossible\n");
  return 0;
}
