#include <bits/stdc++.h>
using namespace std;
long long a00, a01, a10, a11, n;
int ans[100010];
bool solve() {
  if (sqrt(8 * a11 + 1) != floor(sqrt(8 * a11 + 1))) return false;
  if (sqrt(8 * a00 + 1) != floor(sqrt(8 * a00 + 1))) return false;
  long long num0 = ((long long)sqrt(8 * a00 + 1)) + 1;
  num0 /= 2;
  if (a01 == 0 && a10 == 0 && num0 == 1) num0 = 0;
  long long num1 = ((long long)sqrt(8 * a11 + 1)) + 1;
  num1 /= 2;
  if (a01 == 0 && a10 == 0 && num1 == 1) num1 = 0;
  long long num = num0 + num1;
  n = num;
  if ((a00 + a01 + a10 + a11) != (num * (num - 1) / 2)) return false;
  long long b = num1 == 0 ? num : a01 / num1;
  long long d = num1 == 0 ? 0 : a01 % num1;
  long long c = num1;
  for (int i = 0; i < num; i++) {
    if (b > 0) {
      ans[i] = 0;
      b--;
      continue;
    }
    if (c > 0) {
      if (d == c) {
        d = -1;
        ans[i] = 0;
      } else {
        ans[i] = 1;
        c--;
      }
      continue;
    }
    ans[i] = 0;
  }
  return true;
}
int main() {
  scanf("%I64d%I64d%I64d%I64d", &a00, &a01, &a10, &a11);
  if (!solve())
    printf("Impossible\n");
  else {
    for (int i = 0; i < n; i++) printf("%d", ans[i]);
    if (a00 == 0 && a01 == 0 && a10 == 0 && a11 == 0) printf("0");
    printf("\n");
  }
  return 0;
}
