#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 2001 * 1001;
long long ans[MAXN] = {};
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long a00, a01, a10, a11;
  cin >> a00 >> a01 >> a10 >> a11;
  long long a0 = 0, a1 = 0;
  while (a0 * (a0 - 1) / 2 < a00) a0++;
  if (a0 * (a0 - 1) / 2 > a00) return cout << "Impossible", 0;
  while (a1 * (a1 - 1) / 2 < a11) a1++;
  if (a1 * (a1 - 1) / 2 > a11) return cout << "Impossible", 0;
  if (a0 == 0 && a1 == 0) {
    if (a10 == 0 && a01 == 0) return cout << "0", 0;
    if (a10 == 0 && a01 == 1) {
      return cout << "01", 0;
    }
    if (a10 == 1 && a01 == 0) return cout << "10", 0;
    return cout << "Impossible", 0;
  }
  if (a0 == 0) {
    if (a10 + a01 == 0) {
      for (long long i = 0; i < a1; i++) cout << "1";
      return 0;
    }
    a0++;
  }
  if (a1 == 0) {
    if (a10 + a01 == 0) {
      for (long long i = 0; i < a0; i++) cout << "0";
      return 0;
    }
    a1++;
  }
  long long n = a0 + a1;
  if (a00 + a01 + a10 + a11 != n * (n - 1) / 2) return cout << "Impossible", 0;
  for (long long i = 0; i < a0; i++) ans[i] = 0;
  for (long long i = a0; i < n; i++) ans[i] = 1;
  long long pre = a0;
  while (a10) {
    if (a10 >= a0) {
      swap(ans[pre], ans[pre - a0]);
      a10 -= a0;
      pre++;
      continue;
    }
    swap(ans[pre], ans[pre - a10]);
    break;
  }
  for (long long i = 0; i < n; i++) cout << ans[i];
}
