#include <bits/stdc++.h>
using namespace std;
long long bef0[1000100];
int main() {
  long long a00, a01, a10, a11, sum, a, b, i, n;
  while (cin >> a00 >> a01 >> a10 >> a11) {
    sum = a00 + a01 + a10 + a11;
    if (sum == 0) {
      printf("0\n");
      continue;
    }
    n = sqrt(sum * 2) + 1;
    if (a01 || a10 || a00)
      a = sqrt(a00 * 2) + 1;
    else
      a = 0;
    if (a01 || a10 || a11)
      b = sqrt(a11 * 2) + 1;
    else
      b = 0;
    if (n > 1000000 || n * (n - 1) / 2 != sum || a * (a - 1) / 2 != a00 ||
        b * (b - 1) / 2 != a11 || n != a + b) {
      printf("Impossible\n");
      continue;
    }
    memset(bef0, 0, sizeof(bef0));
    if (a10 < b) {
      bef0[a - 1] = a10;
      b -= a10;
    } else {
      bef0[a - 1] = b;
      a10 -= b;
      b = 0;
      for (i = 0; i < a - 1; i++) {
        if (a10 >= (a - i - 1)) {
          bef0[i] = a10 / (a - i - 1);
          bef0[a - 1] -= bef0[i];
          a10 %= a - i - 1;
        }
      }
    }
    for (i = 0; i < a; i++) {
      while (bef0[i]--) printf("1");
      printf("0");
    }
    while (b--) printf("1");
    printf("\n");
  }
}
