#include <bits/stdc++.h>
using namespace std;
long long llsqrt(long long k) {
  long long lb = 0;
  long long ub = 1ll;
  while (ub * ub < k) ub *= 2ll;
  while (lb < ub) {
    long long m = (ub - lb) / 2ll + lb;
    if (m * m < k) {
      lb = m + 1;
    } else if (m * m > k) {
      ub = m - 1;
    } else {
      return m;
    }
  }
  if (lb * lb == k) {
    return lb;
  } else {
    return -1ll;
  }
}
vector<long long> f(long long a, long long b, long long c) {
  vector<long long> sol;
  long long d = b * b - 4ll * a * c;
  if (d < 0ll) return sol;
  long long sqd = llsqrt(d);
  if (sqd < 0) return sol;
  long long p[2] = {-1ll, -1ll};
  p[0] = -b + sqd;
  p[1] = -b - sqd;
  for (int i = 0; i < 2; i++) {
    if (p[i] % 2) {
      p[i] = -1ll;
    } else {
      p[i] /= 2ll;
    }
    if (p[i] >= 0) {
      sol.push_back(p[i]);
    }
  }
  return sol;
}
int main() {
  long long a00, a01, a10, a11;
  cin >> a00 >> a01 >> a10 >> a11;
  long long sum = a00 + a01 + a10 + a11;
  auto an = f(1ll, -1ll, -2ll * sum);
  auto ax0 = f(1ll, -1ll, -2ll * a00);
  auto ax1 = f(1ll, -1ll, -2ll * a11);
  for (auto n : an)
    for (auto x0 : ax0)
      for (auto x1 : ax1) {
        if (n <= 0 or x0 < 0 or x1 < 0 or (x0 * x1 != (a01 + a10)) or
            (x0 + x1 != n)) {
          continue;
        }
        long long c10 = 0ll;
        while (c10 + x0 <= a10 and x1 and x0) {
          cout << '1';
          c10 += x0;
          x1--;
        }
        if (c10 < a10) {
          int to = x0 - (a10 - c10);
          for (int i = 0; i < to; i++) {
            cout << '0';
            c10++;
            x0--;
          }
          while (not x1)
            ;
          cout << '1';
          x1--;
        }
        while (x0) {
          cout << '0';
          x0--;
        }
        while (x1) {
          cout << '1';
          x1--;
        }
        cout << '\n';
        return 0;
      }
  cout << "Impossible\n";
}
