#include <bits/stdc++.h>
using namespace std;
long long n, n00, n01, n10, n11, n0, n1;
long long curn01, curn10;
vector<long long> ans, zs, os;
set<long long> now[2];
int main() {
  cin >> n00 >> n01 >> n10 >> n11;
  for (long long i = 1; i <= 1e6; ++i)
    if (i * (i - 1) == 2 * n11) {
      n1 = i;
      break;
    }
  for (long long i = 1; i <= 1e6; ++i)
    if (i * (i - 1) == 2 * n00) {
      n0 = i;
      break;
    }
  if (!n1) return cout << "Impossible", 0;
  if (!n0) return cout << "Impossible", 0;
  if (!n00 && !n11) {
    if (!n01 && !n10) {
      cout << 0;
      return 0;
    }
    n1 = 1;
    n0 = 1;
  }
  if (!n00) {
    if (!n01 && !n10) {
      while (n1--) cout << 1;
      return 0;
    }
    n0 = 1;
  }
  if (!n11) {
    if (!n01 && !n10) {
      while (n0--) cout << 0;
      return 0;
    }
    n1 = 1;
  }
  n = n0 + n1;
  for (int i = 0; i < n; ++i) {
    if (curn10 + n0 <= n10) {
      ans.push_back(1);
      curn10 += n0;
      os.push_back(i);
      --n1;
    } else {
      ans.push_back(0);
      zs.push_back(i);
      curn01 += n1;
      --n0;
    }
  }
  if ((long long)zs.size() * ((long long)zs.size() - 1) != n00 * 2 ||
      (long long)os.size() * ((long long)os.size() - 1) != n11 * 2)
    return cout << "Impossible", 0;
  curn01 = curn10 = 0;
  for (int i = 0; i < n; ++i) {
    if (!ans[i])
      curn01 += os.end() - upper_bound(os.begin(), os.end(), i);
    else
      curn10 += zs.end() - upper_bound(zs.begin(), zs.end(), i);
  }
  if (curn01 != n01 || curn10 != n10) return cout << "Impossible", 0;
  for (int i = 0; i < n; ++i) cout << ans[i];
  return 0;
}
