#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int sign = 1, sum = 0;
  char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') sign = -1;
    c = getchar();
  }
  while (isdigit(c)) {
    sum = (sum << 1) + (sum << 3) + c - '0';
    c = getchar();
  }
  return sign * sum;
}
int a, b, c, d;
int main() {
  a = read(), b = read(), c = read(), d = read();
  if (!a && !b && !c && !d) return puts("0"), 0;
  int cnt[2];
  cnt[0] = cnt[1] = 0;
  if (!a && !b && !c)
    cnt[0] = 0;
  else
    cnt[0] = 1;
  if (!b && !c && !d)
    cnt[1] = 0;
  else
    cnt[1] = 1;
  if (a) cnt[0] = sqrt(a * 2) + 1;
  if (d) cnt[1] = sqrt(d * 2) + 1;
  if (cnt[0] * (cnt[0] - 1) != (a << 1) || cnt[1] * (cnt[1] - 1) != (d << 1) ||
      cnt[0] * cnt[1] != b + c)
    return puts("Impossible"), 0;
  while (b) {
    if (b >= cnt[1])
      printf("0"), b -= cnt[1], --cnt[0];
    else if (c >= cnt[0])
      printf("1"), c -= cnt[0], --cnt[1];
  }
  for (int i = 1; i <= cnt[1]; ++i) printf("1");
  for (int i = 1; i <= cnt[0]; ++i) printf("0");
}
