#include <bits/stdc++.h>
using namespace std;
char ans[1000010];
int main() {
  int a, b, c, d;
  scanf("%d%d%d%d", &a, &b, &c, &d);
  if (!a && !b && !c && !d) {
    puts("0");
    return 0;
  }
  int cnt, cnt1;
  if (a)
    cnt = (int)sqrt(a + a) + 1;
  else if (!b && !c)
    cnt = 0;
  else
    cnt = 1;
  if (cnt * (cnt - 1) / 2 > a && cnt != 0) cnt--;
  if (d)
    cnt1 = (int)sqrt(d + d) + 1;
  else if (!b && !c)
    cnt1 = 0;
  else
    cnt1 = 1;
  if (cnt1 * (cnt1 - 1) / 2 > d && cnt1 != 0) cnt1--;
  if (cnt * (cnt - 1) / 2 != a || cnt1 * (cnt1 - 1) / 2 != d ||
      cnt * cnt1 != b + c) {
    puts("Impossible");
    return 0;
  }
  int cnt2 = 0, cnt3 = 0, tot = 0;
  for (; cnt1 && b >= cnt1;) {
    ans[tot++] = '0';
    cnt2++;
    b -= cnt1;
  }
  if (b > 0) {
    int tmp = cnt1 - b;
    cnt3 += tmp;
    for (; tmp--; ans[tot++] = '1')
      ;
    ans[tot++] = '0';
    cnt2++;
  }
  for (cnt3++; cnt3 <= cnt1; cnt3++) ans[tot++] = '1';
  for (cnt2++; cnt2 <= cnt; cnt2++) ans[tot++] = '0';
  puts(ans);
  return 0;
}
