#include <bits/stdc++.h>
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops")
#pragma GCC optimize("no-stack-protector,fast-math")
using namespace std;
const long long N = 1e6 + 1000, OO = 1e15 + 7, T = 13, M = 998244353, P = 6151,
                SQ = 360, LG = 50;
long long get(long long x) {
  long long i = 0, t = 0;
  while (t < x) {
    i++;
    t = i * (i - 1) / 2;
  }
  if (t == x) return i;
  return -1;
}
char ans[N];
int32_t main() {
  long long a, b, c, d;
  cin >> a >> b >> c >> d;
  if (a == 0 && d == 0 && c == 0 && b == 0) return cout << 1, 0;
  long long n = get(a + b + c + d);
  long long x = get(a), y = get(d);
  if (x == 0 && b + c > 0) x = 1;
  if (y == 0 && b + c > 0) y = 1;
  if (n == -1 || x == -1 || y == -1 || x + y != n || x * y != (b + c))
    return cout << "Impossible", 0;
  if (x == 0) {
    for (long long i = 1; i <= y; i++) cout << 1;
    return 0;
  }
  if (y == 0) {
    for (long long i = 1; i <= x; i++) cout << 0;
    return 0;
  }
  ans[x + y] = 0;
  long long b01 = b, b10 = c;
  for (long long i = x + y - 1; i >= 0; i--) {
    if (b01 >= x) {
      b01 -= x;
      ans[i] = '1';
      y--;
    } else {
      b10 -= y;
      ans[i] = '0';
      x--;
    }
  }
  long long i = 0;
  while (ans[i] != 0) {
    cout << ans[i];
    i++;
  }
  return 0;
}
