#include <bits/stdc++.h>
using namespace std;
int a[4];
char ans[1000100];
int main() {
  for (int i = 0; i < 4; i++) scanf("%d", &a[i]);
  if (!a[0] && !a[1] && !a[2] && !a[3]) {
    printf("0\n");
    return 0;
  }
  int cnt0, cnt1;
  if (!a[0] && !a[1] && !a[2])
    cnt0 = 0;
  else
    cnt0 = 1;
  if (!a[3] && !a[1] && !a[2])
    cnt1 = 0;
  else
    cnt1 = 1;
  if (a[0]) cnt0 = (int)sqrt(a[0] * 2) + 1;
  if (a[3]) cnt1 = (int)sqrt(a[3] * 2) + 1;
  if (a[0] * 2 != cnt0 * (cnt0 - 1) || a[3] * 2 != cnt1 * (cnt1 - 1) ||
      cnt0 * cnt1 != a[1] + a[2]) {
    puts("Impossible");
    return 0;
  }
  int p = 0, r = 0;
  while (a[1]) {
    if (a[1] >= cnt1) {
      ans[p++] = '0';
      a[1] -= cnt1;
      r++;
    } else {
      int m = cnt1 - a[1];
      while (m) ans[p++] = '1', m--;
      ans[p++] = '0', r++;
      a[1] = 0;
    }
  }
  int s = p - r;
  while (cnt1 - s) ans[p++] = '1', s++;
  while (cnt0 - r) ans[p++] = '0', r++;
  puts(ans);
  return 0;
}
