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