#include <bits/stdc++.h>
using namespace std;
int now, k, a11, a10, a01, a00, x0, x1, i;
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch <= '9' && ch >= '0') x = x * 10 + ch - '0', ch = getchar();
  return x * f;
}
inline void write(int x) {
  if (x < 0) putchar('-'), x = -x;
  if (x >= 10) write(x / 10);
  putchar(x % 10 + '0');
}
int main() {
  a00 = read();
  a01 = read();
  a10 = read();
  a11 = read();
  if (a00 == 0 && a01 == 0 && a10 == 0 && a11 == 0) {
    puts("0");
    return 0;
  }
  x0 = sqrt(a00 * 2) + 1;
  if (x0 * (x0 - 1) / 2 != a00) {
    puts("Impossible");
    return 0;
  }
  if (a00 == 0 && a01 == 0 && a10 == 0) x0 = 0;
  x1 = sqrt(a11 * 2) + 1;
  if (x1 * (x1 - 1) / 2 != a11) {
    puts("Impossible");
    return 0;
  }
  if (a11 == 0 && a10 == 0 && a01 == 0) x1 = 0;
  if (x0 == 0) {
    if (a01 || a10) {
      puts("Impossible");
      return 0;
    }
    for (i = 1; i <= x1; i++) putchar('1');
    return 0;
  }
  if (x1 == 0) {
    if (a01 || a10) {
      puts("Impossible");
      return 0;
    }
    for (i = 1; i <= x0; i++) putchar('0');
    return 0;
  }
  if (a01 + a10 != x0 * x1) {
    puts("Impossible");
    return 0;
  }
  if (a00 == 0 && a11 == 0) {
    if (a10 && a01) {
      puts("Impossible");
      return 0;
    }
    if (a10)
      puts("10");
    else
      puts("01");
    return 0;
  }
  if (a00 == 0) {
    for (i = 1; i <= a10; i++) putchar('1');
    putchar('0');
    for (i = 1; i <= a01; i++) putchar('1');
    return 0;
  }
  if (a11 == 0) {
    for (i = 1; i <= a01; i++) putchar('0');
    putchar('1');
    for (i = 1; i <= a10; i++) putchar('0');
    return 0;
  }
  k = x1;
  now = 0;
  for (i = 1; i <= x1 + x0; i++) {
    if (now + k <= a01) {
      putchar('0');
      now += k;
    } else {
      putchar('1');
      k--;
    }
  }
}
