#include <bits/stdc++.h>
using namespace std;
long long a, b, c, d;
int main() {
  scanf("%I64d%I64d%I64d%I64d", &a, &b, &c, &d);
  long long n0 = (sqrt(8 * a + 1) + 1) / 2, n1 = (sqrt(8 * d + 1) + 1) / 2;
  if (b == 0 && c == 0 && a == 0) n0 = 0;
  if (b == 0 && c == 0 && d == 0) n1 = 0;
  if (n0 == 0 && n1 == 0) {
    printf("0");
    return 0;
  }
  if (n1 * n0 != b + c || n0 * (n0 - 1) != 2 * a || n1 * (n1 - 1) != 2 * d) {
    printf("Impossible");
    return 0;
  }
  long long l = 0, md = 0;
  if (b != 0) l = b / n1, md = b % n1;
  for (int i = 1; i <= l; ++i) printf("0");
  for (int i = 1; i <= n1 - md; ++i) printf("1");
  if (md) {
    printf("0");
    l++;
  }
  for (int i = 1; i <= md; ++i) printf("1");
  for (int i = 1; i <= n0 - l; ++i) printf("0");
  return 0;
}
