#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1000005;
long long a00, a01, a10, a11;
long long newton(long long n) { return n * (n - 1) / 2; }
long long sqrNewton(long long x) {
  long long n = 0;
  while (newton(n) < x) n++;
  return newton(n) == x ? n : -1;
}
int W[MAXN];
bool policz(long long zero, long long one) {
  long long ile = zero * one;
  long long n = zero + one;
  if (zero < 0 || one < 0 || (newton(n) != a00 + a01 + a10 + a11) || ile < a01)
    return false;
  int suf = 0;
  while (one > 0 && ile - one >= a01) {
    suf++;
    ile -= one;
    if (suf > zero) return false;
  }
  for (int i = 1; i <= n; i++) W[i] = 1;
  for (int i = 1; i <= zero - suf; i++) W[i] = 0;
  for (int i = 1; i <= suf; i++) W[n - i + 1] = 0;
  long long p = ile - a01;
  if (p > 0) {
    W[zero - suf + p] = 0;
    W[zero - suf] = 1;
  }
  for (int i = 1; i <= n; i++) cout << W[i];
  return true;
}
int main() {
  cin >> a00 >> a01 >> a10 >> a11;
  if (a00 == 0 && a01 == 0 && a10 == 0 && a11 == 0) {
    cout << "0";
    return 0;
  }
  vector<long long> zero;
  vector<long long> one;
  zero.push_back(sqrNewton(a00));
  one.push_back(sqrNewton(a11));
  if (a00 == 0) zero.push_back(1);
  if (a11 == 0) one.push_back(1);
  int d1 = zero.size();
  int d2 = one.size();
  for (int i = 0; i < d1; i++)
    for (int j = 0; j < d2; j++)
      if (policz(zero[i], one[j])) return 0;
  cout << "Impossible";
  return 0;
}
