#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 5;
char ans[maxn];
int main() {
  long long x, y, z, h;
  scanf("%lld%lld%lld%lld", &x, &y, &z, &h);
  long long n = -1, m = -1;
  for (long long i = 1; i <= 1e5; i++) {
    if (i * (i - 1) / 2 == x) {
      n = i;
    }
    if (i * (i - 1) / 2 == h) {
      m = i;
    }
  }
  if (x == 0 && y == 0 && z == 0 && h == 0) {
    return 0 * printf("1\n");
  }
  if (n == 1) {
    if (y == 0 && z == 0) n = 0;
  }
  if (m == 1) {
    if (y == 0 && z == 0) m = 0;
  }
  if (m == -1 || n == -1) return 0 * printf("Impossible\n");
  ;
  if (x + y + z + h != (n + m) * (n + m - 1) / 2) {
    return 0 * printf("Impossible\n");
    ;
  }
  int len = 0;
  while (n || m) {
    if (n == 0) {
      ans[++len] = '1';
      m--;
    } else {
      if (y >= m) {
        ans[++len] = '0';
        n--;
        y -= m;
      } else {
        ans[++len] = '1';
        m--;
        x -= n;
      }
    }
  }
  if (x != 0 && y != 0 && n != 0 && m != 0) return 0 * printf("Impossible\n");
  ;
  ans[++len] = '\0';
  printf("%s", ans + 1);
}
