#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
long long mod = 1e9 + 7;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long a, b, c, d;
  cin >> a >> b >> c >> d;
  long long i, j, k, n, sum = a + b + c + d;
  for (n = 1;; ++n)
    if ((n * (n - 1) >> 1ll) >= sum) break;
  if ((n * (n - 1) >> 1ll) > sum) return cout << "Impossible", 0;
  long long n0 = 1, n1 = 1;
  for (n0 = 1;; ++n0)
    if ((n0 * (n0 - 1) >> 1ll) >= a) break;
  if ((n0 * (n0 - 1) >> 1ll) > a) return cout << "Impossible", 0;
  for (n1 = 1;; ++n1)
    if ((n1 * (n1 - 1) >> 1ll) >= d) break;
  if ((n1 * (n1 - 1) >> 1ll) > d) return cout << "Impossible", 0;
  if (a + b + c == 0) {
    for (i = 0; i < n1; ++i) cout << '1';
    return 0;
  }
  if (b + c + d == 0) {
    for (i = 0; i < n0; ++i) cout << '0';
    return 0;
  }
  if (n != (n0 + n1)) return cout << "Impossible", 0;
  k = ((n * (n - 1)) >> 1ll) - a - d;
  if (k != (b + c)) return cout << "Impossible", 0;
  string s("");
  for (i = 0; i < n0; ++i) s += '0';
  for (i = 0; i < n1; ++i) s += '1';
  long long c0 = n0 * n1, c1 = 0;
  j = n1, i = n0 - 1;
  while (c0 > b) {
    k = min(c0 - b, j);
    swap(s[i], s[i + k]);
    --i;
    c0 -= k;
  }
  cout << s;
  return 0;
}
