#include <bits/stdc++.h>
using namespace std;
int n;
int A[4];
int ff[(1001000)];
int ge0, ge1, ge01, ge10;
inline void solve() {
  ge0 = ge1 = -1;
  for (int i = 1; i <= n; ++i)
    if (ff[i] == A[0]) {
      ge0 = i;
      break;
    }
  for (int i = 1; i <= n; ++i)
    if (ff[i] == A[3]) {
      ge1 = i;
      break;
    }
  if (A[0] == 0 && A[1] == 0 && A[2] == 0) ge0 = 0;
  if (A[3] == 0 && A[2] == 0 && A[1] == 0) ge1 = 0;
  if (A[0] + A[1] + A[2] + A[3] == 0) {
    printf("0\n");
    return;
  }
  if (ge0 == -1 || ge1 == -1) {
    printf("Impossible\n");
    return;
  }
  if (A[1] + A[2] != ge0 * ge1) {
    printf("Impossible\n");
    return;
  }
  ge01 = A[1];
  for (; ge0; --ge0) {
    if (ge01 - ge1 < 0) break;
    printf("0");
    ge01 -= ge1;
  }
  for (int i = 1; i <= ge1 - ge01; ++i) printf("1");
  ge1 = ge01;
  if (ge0) {
    printf("0");
    ge0--;
  }
  for (int i = 1; i <= ge1; ++i) printf("1");
  for (int i = 1; i <= ge0; ++i) printf("0");
}
inline void beforedo() {
  cin >> A[0] >> A[1] >> A[2] >> A[3];
  for (int i = 1; i; ++i) {
    ff[i] = i * (i - 1) / 2;
    if ((long long)i * (long long)(i - 1) > 2000000000) {
      n = i - 1;
      break;
    }
  }
}
int main() {
  beforedo();
  solve();
  return 0;
}
