#include <bits/stdc++.h>
using namespace std;
const int N = 1000005;
const int M = 1000000007;
long long a, b, c, d;
char s[N];
char ans[N];
long long get(long long x) {
  long long k = 0;
  while (k * (k - 1ll) / 2 < x) {
    k++;
  }
  return k * (k - 1ll) / 2 == x ? k : -1;
}
int main() {
  while (~scanf("%I64d%I64d%I64d%I64d", &a, &b, &c, &d)) {
    if (a == b && b == c && c == d && d == 0) {
      puts("0");
      continue;
    }
    long long len = get(a + b + c + d), n0 = get(a), n1 = get(d);
    if (!n0 && (b || c)) {
      n0++;
    }
    if (!n1 && (b || c)) {
      n1++;
    }
    if (len == -1 || n0 == -1 || n1 == -1 || n0 * n1 != b + c ||
        len > 1000000) {
      puts("Impossible");
      continue;
    }
    fill(ans, ans + n0, '0');
    fill(ans + n0, ans + len, '1');
    for (int i = 0, j = n0, crt = 0; crt < c;) {
      if (c - crt > n0) {
        ans[i++] = '1';
        ans[j++] = '0';
        crt += n0;
      } else {
        ans[j - c + crt] = '1';
        ans[j++] = '0';
        i++;
        crt += c - crt;
      }
    }
    ans[len] = 0;
    puts(ans);
  }
}
