#include <bits/stdc++.h>
using namespace std;
const int N = 100;
const long long oo = 1000;
long long Find(long long x) {
  for (int i = 0; (i * (i - 1)) / 2 <= x; i++) {
    if (i * (i - 1) / 2 == x) return i;
  }
  return -1;
}
long long kD, kA, A, B, C, D;
int main() {
  cin >> A >> B >> C >> D;
  if (!A && !B && !C && !D) {
    printf("0");
    return 0;
  }
  kA = Find(A);
  kD = Find(D);
  if (kA == -1 || kD == -1) {
    printf("Impossible");
    return 0;
  }
  if (kA == 0)
    if (B != 0 || C != 0) kA = 1;
  if (kD == 0)
    if (C != 0 || B != 0) kD = 1;
  long long cnt = kA + kD;
  if ((cnt * (cnt - 1) / 2) != A + B + C + D) {
    printf("Impossible");
    return 0;
  }
  while (B > kD) {
    printf("0");
    B -= kD;
    kA--;
  }
  if (B == kD) {
    printf("0");
    B -= kD;
    kA--;
  }
  while (kD > B) {
    printf("1");
    kD--;
  }
  if (B) {
    printf("0");
    kA--;
  }
  while (kD > 0) {
    printf("1");
    kD--;
  }
  while (kA > 0) {
    printf("0");
    kA--;
  }
}
