#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a00, a01, a10, a11;
  cin >> a00 >> a01 >> a10 >> a11;
  if (a00 == 0 && a01 == 0 && a10 == 0 && a11 == 0) {
    cout << 0;
    return 0;
  }
  if (a00 == 0 && a01 == 1 && a10 == 0 && a11 == 0) {
    cout << "01";
    return 0;
  }
  if (a00 == 0 && a01 == 0 && a10 == 1 && a11 == 0) {
    cout << "10";
    return 0;
  }
  if (a11 == 0 && a10 == 0 && a01 == 0) {
    long long d1 = 1 + a00 * 8;
    long long r1 = sqrt(d1);
    if (r1 * r1 != d1 || !(r1 & 1))
      cout << "Impossible";
    else {
      long long zeros = (r1 - 1) / 2;
      for (int i = 0; i < zeros + 1; ++i) cout << 0;
    }
    return 0;
  }
  if (a00 == 0 && a10 == 0 && a01 == 0) {
    long long d1 = 1 + a11 * 8;
    long long r1 = sqrt(d1);
    if (r1 * r1 != d1 || !(r1 & 1))
      cout << "Impossible";
    else {
      long long ones = (r1 - 1) / 2;
      for (int i = 0; i < ones + 1; ++i) cout << 1;
    }
    return 0;
  }
  long long ones, zeros;
  for (ones = 1; ones < 1000003; ++ones)
    if (ones * (ones - 1) == 2 * a11) break;
  if (ones == 1000003) {
    cout << "Impossible";
    return 0;
  }
  for (zeros = 1; zeros < 1000003; ++zeros)
    if (zeros * (zeros - 1) == 2 * a00) break;
  if (zeros == 100003) {
    cout << "Impossible";
    return 0;
  }
  if (a01 + a10 != ones * zeros) {
    cout << "Impossible";
    return 0;
  }
  long long a[ones + zeros];
  long long x = a10 / ones, y = a10 % ones;
  long long st = zeros - x;
  if (y != 0) st--;
  long long i;
  for (i = 0; i < st; ++i) cout << 0;
  for (i = 0; i < y; ++i) cout << 1;
  if (y != 0) {
    cout << 0;
    st++;
  }
  for (i = y; i < ones; ++i) cout << 1;
  for (i = st; i < zeros; ++i) cout << 0;
  return 0;
}
