#include <bits/stdc++.h>
int main() {
  long long a00, a01, a10, a11, c0, c1;
  std::cin >> a00 >> a01 >> a10 >> a11;
  c0 = (round(sqrt(8 * a00 + 1)) + 1) / 2;
  c1 = (round(sqrt(8 * a11 + 1)) + 1) / 2;
  if (!a01 && !a10) {
    if (!a00)
      c0 = 0;
    else
      c1 = 0;
  }
  if (c0 * (c0 - 1) / 2 != a00 || c1 * (c1 - 1) / 2 != a11 ||
      a01 + a10 != c0 * c1) {
    puts("Impossible");
    return 0;
  }
  while (c0 + c1)
    if (a01 >= c1) {
      putchar('0');
      a01 -= c1;
      --c0;
    } else {
      putchar('1');
      a10 -= c0;
      --c1;
    }
}
