#include <bits/stdc++.h>
using namespace std;
using namespace std;
const int MAXN = 2e6 + 5;
long long a[MAXN], a1, a2, a3, a4;
long long findn(long long m) {
  if (m == 0) return 1LL;
  m *= 2;
  long long nn = (long long)sqrt((long long)m);
  while ((long long)nn * (long long)nn - (long long)nn < m) nn++;
  if ((long long)nn * (long long)nn - (long long)nn != m) return -1LL;
  return nn;
}
bool check(long long m) {
  long long num0 = 0, num1 = 0;
  long long aa2 = 0, aa3 = 0;
  for (long long i = 1; i <= m; i++) {
    if (a[i] == 1) {
      aa2 += num0;
      num1++;
    } else {
      aa3 += num1;
      num0++;
    }
  }
  return ((aa2 == a2) && (aa3 == a3));
}
int main() {
  long long m, n, i, j, k;
  cin >> a1 >> a2 >> a3 >> a4;
  long long sum = a1 + a2 + a3 + a4;
  if (findn(sum) == -1) return puts("Impossible");
  if (a1 == 0 && a2 == 0 && a3 == 0 && a4 == 0) return puts("0");
  if (a1 != 0 && a2 == 0 && a3 == 0 && a4 == 0) {
    m = findn(a1);
    for (i = 1; i <= m; i++) cout << 0;
    cout << endl;
    return 0;
  }
  if (a1 == 0 && a2 == 0 && a3 == 0 && a4 != 0) {
    m = findn(a4);
    for (i = 1; i <= m; i++) cout << 1;
    cout << endl;
    return 0;
  }
  long long num0 = findn(a1), num1 = findn(a4);
  if (num0 == -1 || num1 == -1) return puts("Impossible");
  m = num0 + num1;
  if (num0 + num1 != findn(sum)) return puts("Impossible");
  for (i = 1; i <= num0; i++) a[i] = 0;
  for (i = num0 + 1; i <= num0 + num1; i++) a[i] = 1;
  long long tol = num0 * num1;
  j = 1;
  for (i = num0 + 1; i <= num0 + num1; i++) {
    if (tol == a2) break;
    if (tol > a2) {
      if (tol - a2 >= num0) {
        tol -= num0;
        j = i - num0;
        swap(a[i], a[j]);
      } else {
        j = i - (tol - a2);
        swap(a[i], a[j]);
        tol = a2;
      }
    }
  }
  if (!check(m)) return puts("Impossible");
  for (i = 1; i <= m; i++) printf("%I64d", a[i]);
  printf("\n");
}
