#include <bits/stdc++.h>
using namespace std;
int a, b, c, d, t, cnt1, cnt2, num[1000005];
int main() {
  scanf("%d%d%d%d", &a, &b, &c, &d);
  cnt1 = sqrt(2 * a) + 1, cnt2 = sqrt(2 * d) + 1;
  if (cnt1 * (cnt1 - 1) != 2 * a || cnt2 * (cnt2 - 1) != 2 * d)
    return puts("Impossible"), 0;
  if (a + b + c + d == 0) return puts("0"), 0;
  if (a + b + c == 0) {
    for (int i = 1; i <= cnt2; i++) printf("1");
    return 0;
  }
  if (b + c + d == 0) {
    for (int i = 1; i <= cnt1; i++) printf("0");
    return 0;
  }
  if (cnt1 * cnt2 != b + c) return puts("Impossible"), 0;
  while (c) {
    if (c >= cnt1)
      c -= cnt1, num[++t] = 1;
    else {
      num[++t + cnt1 - c] = 1;
      c = 0;
      break;
    }
  }
  for (int i = 1; i <= cnt2 - t; i++) num[cnt1 + cnt2 + 1 - i] = 1;
  for (int i = 1; i <= cnt1 + cnt2; i++) printf("%d", num[i]);
  return 0;
}
