#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:64000000")
using namespace std;
void bin_ser();
void bin_ser1();
long long a00, a01, a10, a11;
long long k0 = -1, k1 = -1;
int main() {
  cin >> a00 >> a01 >> a10 >> a11;
  if (a00 + a01 + a10 + a11 == 0) {
    cout << '0' << endl;
    return 0;
  }
  bin_ser();
  bin_ser1();
  if (a00 == 0) {
    if (a01 + a10 == 0) {
      k0 = 0;
    } else {
      k0 = 1;
    }
  }
  if (a11 == 0) {
    if (a01 + a10 == 0) {
      k1 = 0;
    } else {
      k1 = 1;
    }
  }
  if ((a01 + a10 != k0 * k1) || (k0 == -1 || k1 == -1)) {
    cout << "Impossible" << endl;
    return 0;
  }
  while (k0 || k1) {
    if (k0 == 0) {
      cout << '1';
      --k1;
      continue;
    }
    if (k1 == 0) {
      cout << '0';
      --k0;
      continue;
    }
    if (a01 >= k1) {
      cout << '0';
      --k0;
      a01 -= k1;
    } else {
      cout << '1';
      --k1;
    }
  }
}
void bin_ser() {
  long long l = 2;
  long long r = 1e6 + 228;
  while (true) {
    long long mid = (l + r) / 2;
    if ((mid * (mid - 1) / 2) == a00) {
      k0 = mid;
      return;
    }
    if ((mid * (mid - 1) / 2) < a00) {
      if (l == mid) return;
      l = mid;
    }
    if ((mid * (mid - 1) / 2) > a00) {
      if (r == mid) return;
      r = mid;
    }
    if (l >= r) {
      return;
    }
  }
}
void bin_ser1() {
  long long l = 2;
  long long r = 1e6 + 228;
  while (true) {
    long long mid = (l + r) / 2;
    if ((mid * (mid - 1) / 2) == a11) {
      k1 = mid;
      return;
    }
    if ((mid * (mid - 1) / 2) < a11) {
      if (l == mid) return;
      l = mid;
    }
    if ((mid * (mid - 1) / 2) > a11) {
      if (r == mid) return;
      r = mid;
    }
    if (l >= r) {
      return;
    }
  }
}
