#include <bits/stdc++.h>
using namespace std;
long long ll = 1;
int a00, a01, a10, a11;
int calc(int x) {
  int l = 0, r = 1e9 + 5;
  while (l <= r) {
    int mid = (l + r) / 2;
    if (mid * ll * mid - mid == x) {
      return mid;
    }
    if (mid * ll * mid - mid < x) {
      l = mid + 1;
    } else if (mid * ll * mid - mid > x) {
      r = mid - 1;
    }
  }
  return -1;
}
void check(int o, int z) {
  string ans = "";
  int n = o + z;
  int c01 = a01, c10 = a10;
  for (int i = 0; i < n; i++) {
    if (c01 >= o) {
      c01 -= o;
      ans += "0";
      z--;
    } else {
      c10 -= z;
      ans += '1';
      o--;
    }
  }
  if (!z && !o && !c01 && !c10) {
    puts(ans.c_str());
    exit(0);
  }
}
int main() {
  scanf("%d%d%d%d", &a00, &a01, &a10, &a11);
  if (!a00 && !a11) {
    if (a10 == 1 && !a01) {
      puts("10");
    } else if (a01 == 1 && !a10) {
      puts("01");
    } else if (!a01 && !a10) {
      puts("1");
    } else
      puts("Impossible");
    return 0;
  }
  string ans = "";
  int z = calc(2 * a00), o = calc(2 * a11);
  if (o == -1 || z == -1) {
    puts("Impossible");
    return 0;
  }
  if (a00 == 0 && a11) {
    check(o, 0);
    check(o, 1);
  } else if (a11 == 0 && a00) {
    check(1, z);
    check(0, z);
  } else if (a11 && a00) {
    check(o, z);
  }
  puts("Impossible");
  return 0;
}
