#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a0, a1, a2, a3;
  cin >> a0 >> a1 >> a2 >> a3;
  long long sum = a0 + a1 + a2 + a3;
  long long N = -1;
  for (auto i = 0; i < 1000001; i++)
    if (sum == (i * ((long long)i - 1)) / 2) {
      N = i;
    }
  if (N == -1) {
    cout << "Impossible\n";
    return 0;
  }
  long long N0 = -1, N1 = -1;
  bool found = false;
  for (auto i = 0; i < N + 1; i++)
    if (a0 == (i * ((long long)i - 1)) / 2) {
      N0 = i;
      N1 = N - N0;
      if ((a1 + a2) == (N0 * N1) && (N1 * (N1 - 1)) / 2 == a3) {
        found = true;
        break;
      }
    }
  if (!found) {
    cout << "Impossible\n";
    return 0;
  }
  long long n0 = N0, n1 = N1;
  char str[N + 1];
  str[N] = 0;
  int idx = 0;
  while (n1 != 0 && a1 >= n1) {
    str[idx++] = '0';
    a1 -= n1;
    n0--;
  }
  for (auto i = 0; i < n1 - a1; i++) {
    str[idx++] = '1';
  }
  if (n0) {
    str[idx++] = '0';
    n0--;
  }
  for (auto i = 0; i < a1; i++) {
    str[idx++] = '1';
  }
  for (auto i = 0; i < n0; i++) {
    str[idx++] = '0';
  }
  cout << str << endl;
  return 0;
}
