#include <bits/stdc++.h>
using namespace std;
const int MI = 100005, INF = 2000000005;
int t[MI];
int f(int a) {
  a *= 2;
  int pot = sqrt(a);
  for (int g = max(0, pot - 20); g <= pot + 20; ++g) {
    if (g * (g + 1) == a) return g + 1;
  }
  return INF;
}
int main() {
  int exp00, exp01, exp10, exp11;
  scanf("%d%d%d%d", &exp00, &exp01, &exp10, &exp11);
  if (max(max(exp00, exp01), max(exp10, exp11)) == 0) {
    printf("1");
    return 0;
  }
  int ile_jed;
  if (exp11 == 0) {
    if (exp01 == 0 && exp10 == 0)
      ile_jed = 0;
    else
      ile_jed = 1;
  } else {
    ile_jed = f(exp11);
  }
  int ile_zer;
  if (exp00 == 0) {
    if (exp01 == 0 && exp10 == 0)
      ile_zer = 0;
    else
      ile_zer = 1;
  } else {
    ile_zer = f(exp00);
  }
  if ((ile_zer == INF) || (ile_jed == INF) ||
      (ile_zer * ile_jed != exp01 + exp10)) {
    printf("Impossible");
  } else {
    int curr01 = ile_zer * ile_jed;
    int curr10 = 0;
    for (int i = 0; i < ile_jed; ++i) {
      int val = min(ile_zer, curr01 - exp01);
      t[i] = ile_zer - val;
      curr01 -= val;
      curr10 += val;
    }
    sort(t, t + ile_jed);
    int pos = 0;
    for (int i = 0; i < ile_zer; ++i) {
      while (pos < ile_jed && t[pos] == i) {
        printf("1");
        ++pos;
      }
      printf("0");
    }
    while (pos < ile_jed) {
      printf("1");
      ++pos;
    }
  }
}
