#include <bits/stdc++.h>
int a0, a1, n;
int a00, a01, a10, a11;
bool ans = false;
inline void gao(int a0, int a1) {
  n = a0 + a1;
  if ((long long)a00 + a11 + a01 + a10 != (long long)n * (n - 1) / 2 ||
      (a01 + a10 > 0 && (!a0 || !a1)))
    return;
  if (a1 == 0) {
    for (int i = 0; i < n; ++i) putchar('0');
    ans = true;
    return;
  }
  int f0 = a01 / a1;
  int m0 = a01 % a1;
  if (f0 + (m0 > 0) > a0) {
    return;
  }
  if ((long long)a1 * (a0 - (f0 + (m0 > 0))) + (m0 ? a1 - m0 : 0) != a10) {
    return;
  }
  ans = true;
  for (int i = 0; i < f0; ++i) putchar('0');
  for (int i = m0; i < a1; ++i) putchar('1');
  if (m0 > 0) putchar('0');
  for (int i = 0; i < m0; ++i) putchar('1');
  for (int i = f0 + (m0 > 0); i < a0; ++i) putchar('0');
  putchar('\n');
}
int main() {
  scanf("%d%d%d%d", &a00, &a01, &a10, &a11);
  if ((long long)a00 + a01 + a10 + a11 == 0) {
    puts("0");
    return 0;
  }
  a0 = a1 = -1;
  for (int i = 0;; ++i) {
    if ((long long)i * (i - 1) / 2 == a00) {
      a0 = i;
      break;
    }
    if ((long long)i * (i - 1) / 2 > a00) break;
  }
  for (int i = 0;; ++i) {
    if ((long long)i * (i - 1) / 2 == a11) {
      a1 = i;
      break;
    }
    if ((long long)i * (i - 1) / 2 > a11) break;
  }
  if (a0 == -1 || a1 == -1) {
    puts("Impossible");
    return 0;
  }
  gao(a0, a1);
  if (!ans && a0 == 0) gao(1, a1);
  if (!ans && a1 == 0) gao(a0, 1);
  if (!ans && a0 == 0 && a1 == 0) gao(1, 1);
  if (!ans) puts("Impossible");
  return 0;
}
