#include <bits/stdc++.h>
using namespace std;
int a, b, c, d, p, q, n, t;
int ans[1010000];
bool solve(int p, int q, int b, int c) {
  if ((long long)p * (long long)q != (long long)(b + c)) return false;
  n = p + q;
  for (int i = 1; i <= p; i++) ans[i] = 0;
  for (int i = p + 1; i <= n; i++) ans[i] = 1;
  t = p + 1;
  while (c && t <= n) {
    if (c >= p) {
      swap(ans[t - p], ans[t]);
      c -= p;
      t++;
    } else {
      swap(ans[t - c], ans[t]);
      c = 0;
      t++;
    }
  }
  if (c || !n) {
    return false;
  }
  for (int i = 1; i <= n; i++) printf("%d", ans[i]);
  return true;
}
int main() {
  scanf("%d %d %d %d", &a, &b, &c, &d);
  for (; p * (p - 1) / 2 < a; p++)
    ;
  if (p * (p - 1) / 2 != a) {
    printf("Impossible\n");
    return 0;
  }
  for (; q * (q - 1) / 2 < d; q++)
    ;
  if (q * (q - 1) / 2 != d) {
    printf("Impossible\n");
    return 0;
  }
  if (solve(p, q, b, c)) return 0;
  if (!p && solve(p + 1, q, b, c)) return 0;
  if (!q && solve(p, q + 1, b, c)) return 0;
  if (!p && !q && solve(p + 1, q + 1, b, c)) return 0;
  printf("Impossible\n");
  return 0;
  return 0;
}
