#include <bits/stdc++.h>
using namespace std;
const int oo = 1000000009;
const double eps = 1e-9;
const int mod = 1000000007;
long long finnum(long long sum) {
  for (long long i = 0; i <= 100000; ++i) {
    if ((i * (i - 1)) / 2 == sum) {
      return i;
    }
  }
  return -1;
}
int nos[100005];
int main() {
  long long a[4], sum = 0, x, y, n, co = 0, pos = 0;
  for (int i = 0; i < 4; ++i) cin >> a[i];
  for (int i = 0; i < 4; ++i) sum += a[i];
  if (sum == 0) {
    cout << "0"
         << "\n";
    return 0;
  }
  n = finnum(sum);
  x = finnum(a[0]);
  y = finnum(a[3]);
  if (x == 0 && (a[1] || a[2])) x = 1;
  if (y == 0 && (a[1] || a[2])) y = 1;
  if (n == -1 || x == -1 || y == -1 || n != x + y) {
    cout << "Impossible"
         << "\n";
    return 0;
  }
  for (long long i = 0; i < x; ++i) {
    if ((x - i - 1) * y >= a[2])
      nos[i] = 0;
    else {
      nos[i] = a[2] - (x - i - 1) * y;
      a[2] -= nos[i];
    }
  }
  sort(nos, nos + x);
  nos[x] = 10000000;
  for (int i = 0; i <= y; ++i) {
    while (i == nos[pos]) {
      cout << "0";
      ++pos;
    }
    if (i < y) cout << "1";
  }
  cout << "\n";
}
