#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  long long a00, a01, a10, a11;
  cin >> a00 >> a01 >> a10 >> a11;
  long long x, y;
  for (x = 0; (x * (x - 1)) / 2 <= a00; x++) {
  }
  x--;
  if (((x * (x - 1)) / 2) != a00) {
    cout << "Impossible\n";
    return 0;
  }
  for (y = 0; (y * (y - 1)) / 2 <= a11; y++) {
  }
  y--;
  if ((y * (y - 1)) / 2 != a11) {
    cout << "Impossible\n";
    return 0;
  }
  if (y == 1) y = 0;
  if (x == 1) x = 0;
  if ((a00 == 0 || a11 == 0) && (a10 + a01 == 1)) {
    if (a10)
      cout << "10\n";
    else
      cout << "01\n";
    return 0;
  }
  if ((a00 == 0 || a11 == 0) && (a01 + a10 == x + y)) {
    if (a00 == 0 && a11 == 0) {
      cout << "0\n";
    } else if (!a00) {
      while (a10--) cout << "1";
      cout << "0";
      while (a01--) cout << "1";
      cout << endl;
    } else if (!a11) {
      while (a01--) cout << "0";
      cout << "1";
      while (a10--) cout << "0";
      cout << endl;
    }
    return 0;
  } else if ((!a00 || !a11) && (!a10 && !a01)) {
    if (!a00 && !a11)
      cout << "0\n";
    else {
      while (x--) cout << "0";
      while (y--) cout << "1";
      cout << endl;
    }
    return 0;
  } else if (!a00 || !a11) {
    cout << "Impossible\n";
    return 0;
  }
  if (x * y != a01 + a10) {
    cout << "Impossible\n";
    return 0;
  }
  if (!x) {
    for (int i = 0; i < y; i++) cout << "1";
    cout << endl;
    return 0;
  }
  if (!y) {
    for (int i = 0; i < x; i++) cout << "0";
    cout << endl;
    return 0;
  }
  long long temp = y;
  string str = "";
  while (a01 || y) {
    if (a01 < y) {
      str += "1";
      y--;
      continue;
    }
    str += "0";
    a01 -= y;
    x--;
  }
  while (x--) str += "0";
  cout << str << endl;
  return 0;
}
