#include <bits/stdc++.h>
using namespace std;
int a[4], o, z;
int getNum(int a) {
  int ret = 0;
  while (ret * (ret - 1ll) / 2 < a) ++ret;
  if (ret * (ret - 1ll) / 2 == a) return ret;
  return -1;
}
int main() {
  for (int i = (0); i <= (int)(3); ++i) scanf("%d", &a[i]);
  o = getNum(a[0]), z = getNum(a[3]);
  if (o == -1 || z == -1) return printf("Impossible\n"), 0;
  if (a[1] || a[2]) o = max(o, 1), z = max(z, 1);
  if (o * z != a[1] + a[2]) return printf("Impossible\n"), 0;
  if (!o && !z) printf("0");
  while (o && z) {
    if (a[1] >= z)
      printf("0"), --o, a[1] -= z;
    else if (a[2] >= o)
      printf("1"), --z, a[2] -= o;
  }
  while (o) printf("0"), --o;
  while (z) printf("1"), --z;
  printf("\n");
}
