#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, c, d;
  cin >> a >> b >> c >> d;
  long long zctr, octr;
  zctr = octr = 0;
  for (long long i = 1; i <= 1e6; i++)
    if (i * (i - 1) == 2 * a) {
      zctr = i;
      break;
    }
  for (long long i = 1; i <= 1e6; i++)
    if (i * (i - 1) == 2 * d) {
      octr = i;
      break;
    }
  if (!a && !b && !c && !d) {
    cout << "0\n";
    return 0;
  }
  if (!a && !c && !b && d) {
    for (int i = 0; i < octr; i++) cout << "1";
    if (!octr) cout << "Impossible\n";
    return 0;
  }
  if (!d && !c && !b && a) {
    for (int i = 0; i < zctr; i++) cout << "0";
    if (!zctr) cout << "Impossible\n";
    return 0;
  }
  if (zctr == 0 && octr == 0) {
    cout << "Impossible\n";
    return 0;
  }
  if (zctr == 0 && (b || c)) {
    cout << "Impossible\n";
    return 0;
  }
  if (octr == 0 && (b || c)) {
    cout << "Impossible\n";
    return 0;
  }
  if (octr * zctr != c + b) {
    cout << "Impossible\n";
    return 0;
  }
  string ans;
  int full = c / octr;
  int left = c % octr;
  int lzeros = zctr - (full + ((left) ? 1 : 0));
  for (int i = 0; i < lzeros; i++) ans += "0";
  for (int i = 0; i < left; i++) ans += "1";
  if (left) ans += "0";
  for (int i = 0; i < octr - left; i++) ans += "1";
  for (int i = 0; i < full; i++) ans += "0";
  cout << ans << "\n";
  return 0;
}
