#include <bits/stdc++.h>
using namespace std;
long long a00, a01, a10, a11;
long long calc(long long x) {
  if (x == 0) return 1;
  for (long long i = 0; i * (i - 1) / 2 <= x; i++)
    if (i * (i - 1) / 2 == x) return i;
  return -1;
}
signed main() {
  scanf("%lld %lld %lld %lld", &a00, &a01, &a10, &a11);
  if (a00 == 0 && a01 == 0 && a10 == 0 && a11 == 0) {
    puts("0");
    return 0;
  }
  long long a0 = calc(a00), a1 = calc(a11);
  if (a0 == -1 || a1 == -1)
    puts("Impossible");
  else if (a00 + a10 + a01 == 0)
    for (long long i = 1; i <= a1; i++) printf("1");
  else if (a11 + a10 + a01 == 0)
    for (long long i = 1; i <= a0; i++) printf("0");
  else if (a10 + a01 != a1 * a0)
    puts("Impossible");
  else {
    if (a0) {
      long long pre = a10 / a0, cnt = 0;
      a10 %= a0;
      for (long long i = 1; i <= pre; i++, cnt++) printf("1");
      for (long long i = 1; i <= a0 - a10; i++) printf("0");
      if (a1 && a01) printf("1");
      cnt++;
      for (long long i = 1; i <= a10; i++) printf("0");
      if (a01)
        for (long long i = cnt + 1; i <= a1; i++) printf("1");
      puts("");
    } else if (a1) {
      long long pre = a01 / a1, cnt = 0;
      a01 %= a1;
      for (long long i = 1; i <= pre; i++, cnt++) printf("0");
      for (long long i = 1; i <= a1 - a01; i++) printf("1");
      if (a0 && a10) printf("0");
      cnt++;
      for (long long i = 1; i <= a10; i++) printf("1");
      if (a10)
        for (long long i = cnt + 1; i <= a0; i++) printf("0");
      puts("");
    }
  }
}
