#include <bits/stdc++.h>
using namespace std;
long long a, b, c, d, n, m;
int main() {
  scanf("%lld%lld%lld%lld", &a, &b, &c, &d);
  if (!(a + b + c + d)) return puts("0"), 0;
  n = sqrt(2 * a) + 1;
  if (n * (n - 1) != 2 * a) return puts("Impossible"), 0;
  m = sqrt(2 * d) + 1;
  if (m * (m - 1) != 2 * d) return puts("Impossible"), 0;
  if (a == 0 && b == 0 && c == 0) {
    for (int i = 1; i <= m; i++) printf("1");
    return 0;
  }
  if (b == 0 && c == 0 && d == 0) {
    for (int i = 1; i <= n; i++) printf("0");
    return 0;
  }
  if (b + c != n * m) return puts("Impossible"), 0;
  if (n == 0) {
    for (int i = 1; i <= m; i++) printf("0");
    return 0;
  }
  if (m == 0) {
    for (int i = 1; i <= n; i++) printf("1");
    return 0;
  }
  long long x = b / m;
  for (int i = 1; i <= x; i++) printf("0");
  x = m - b % m;
  for (int i = 1; i <= x; i++) printf("1");
  if (n - b / m) printf("0");
  for (int i = 1; i <= b % m; i++) printf("1");
  for (int i = b / m + 2; i <= n; i++) printf("0");
  return 0;
}
