#include <bits/stdc++.h>
using namespace std;
bool ans[1000004];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long a00, a01, a10, a11;
  while (cin >> a00 >> a01 >> a10 >> a11) {
    long long num0, num1, n, m;
    num0 = sqrt(2 * a00);
    num0++;
    if (num0 * (num0 - 1) != 2 * a00) {
      cout << "Impossible" << endl;
      continue;
    }
    num1 = sqrt(2 * a11);
    num1++;
    if (num1 * (num1 - 1) != 2 * a11) {
      cout << "Impossible" << endl;
      continue;
    }
    if (a01 == 0 && a10 == 0)
      if (num1 == 1)
        num1 = 0;
      else if (num0 == 1)
        num0 = 0;
      else {
        cout << "Impossible" << endl;
        continue;
      }
    if (num0 * num1 - a10 != a01) {
      cout << "Impossible" << endl;
      continue;
    }
    n = 0;
    int p = 0, f = 1;
    for (int i = 0; i < num1; i++) {
      int x = a01 / (num1 - i);
      n += x;
      if (n > num0) {
        f = 0;
        break;
      }
      a01 = a01 - (num1 - i) * x;
      for (int j = 0; j < x; j++, p++) ans[p] = 0;
      ans[p++] = 1;
    }
    if (!f) {
      cout << "Impossible" << endl;
      continue;
    }
    for (int i = 0; i < p; i++) cout << ans[i];
    for (int i = n; i < num0; i++) cout << 0;
    cout << endl;
  }
  return 0;
}
