#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
char s[N];
long long a, b, c, d;
long long cal(long long x) {
  long long y = sqrt(x * 2);
  if (y * (y + 1) / 2 != x) {
    printf("Impossible\n");
    exit(0);
  }
  return y + 1;
}
long long C(long long x) { return 1LL * x * (x - 1) / 2; }
void solve(long long x, long long y, long long c01, long long c10) {
  if (C(x + y) != c01 + c10 + a + d) return;
  for (int i = y, j = 0; j < x + y; j++) {
    if (c01 >= i)
      c01 -= i, s[j] = '0';
    else
      s[j] = '1', i--;
  }
  if (x == 0 && y == 0)
    printf("0");
  else
    printf("%s", s);
  exit(0);
}
int main() {
  cin >> a >> b >> c >> d;
  long long x = cal(a), y = cal(d);
  if (a == 0 && d == 0) {
    solve(0, 0, b, c);
  }
  if (a == 0) {
    solve(0, y, b, c);
  }
  if (d == 0) {
    solve(x, 0, b, c);
  }
  solve(x, y, b, c);
  printf("Impossible\n");
}
