#include <bits/stdc++.h>
using namespace std;
const long long INF = 0x3f7f7f7f3f7f7f7f;
const int MAXN = 2000005;
const double eps = 1e-10;
long long a[4], b[MAXN];
int main() {
  long long i, n, m;
  while (scanf("%I64d%I64d%I64d%I64d", &a[0], &a[1], &a[2], &a[3]) != EOF) {
    if (a[0] == 0 && a[3] == 0 && a[1] == 0 && a[2] == 0) {
      puts("0");
      continue;
    }
    if (a[0] == 0)
      n = 0;
    else {
      long long temp = (long long)sqrt(1LL + a[0] * (long long)8);
      if (temp * temp != 1LL + a[0] * (long long)8) {
        puts("Impossible");
        continue;
      } else {
        if ((1LL + temp) % 2) {
          puts("Impossible");
          continue;
        } else
          n = (1LL + temp) / 2;
      }
    }
    if (a[3] == 0)
      m = 0;
    else {
      long long temp = (long long)sqrt(1LL + a[3] * (long long)8);
      if (temp * temp != 1LL + a[3] * (long long)8) {
        puts("Impossible");
        continue;
      } else {
        if ((1LL + temp) % 2) {
          puts("Impossible");
          continue;
        } else
          m = (1LL + temp) / 2;
      }
    }
    if (a[0] == 0 && a[1] == 0 && a[2] == 0) {
      for (i = 1; i <= m; i++) {
        printf("1");
      }
      puts("");
      continue;
    }
    if (a[1] == 0 && a[2] == 0 && a[3] == 0) {
      for (i = 1; i <= n; i++) printf("0");
      puts("");
      continue;
    }
    if (n == 0) n = 1;
    if (m == 0) m = 1;
    if (n * m < a[2] || n * m < a[1]) {
      puts("Impossible");
      continue;
    }
    for (i = 1; i <= m; i++) {
      b[i] = 0;
    }
    long long y = 0;
    i = m;
    long long sum = n * m;
    long long tot = 0;
    while (y < a[2]) {
      long long temp = a[2] - y;
      long long xx = temp / i;
      if (xx == 0) {
        i--;
        continue;
      } else {
        b[i] = xx;
        tot += xx;
        y += xx * i;
        sum -= xx * i;
        i--;
      }
    }
    if (sum != a[1]) {
      puts("Impossible");
      continue;
    }
    for (i = 1; i <= n - tot; i++) {
      printf("0");
    }
    for (i = 1; i <= m; i++) {
      printf("1");
      for (int j = 1; j <= b[i]; j++) {
        printf("0");
      }
    }
    puts("");
  }
  return 0;
}
