#include <bits/stdc++.h>
using namespace std;
int A[2][2], num[2], ans[(1000010)], len;
map<int, int> M;
inline bool work() {
  if (M.find(A[0][0]) == M.end() || M.find(A[1][1]) == M.end()) return false;
  if (!A[0][1] && !A[1][0]) {
    int p = 0;
    if (A[0][0] && A[1][1]) return false;
    if (A[0][0])
      p = 0, len = M[A[0][0]];
    else if (A[1][1])
      p = 1, len = M[A[1][1]];
    else
      len = 1;
    for (int i = 1; i <= len; ++i) ans[i] = p;
    return true;
  }
  for (int i = 0; i < 2; ++i) num[i] = M[A[i][i]];
  long long all =
      (long long)(num[0] + num[1]) * (long long)(num[0] + num[1] - 1) / 2LL;
  if ((long long)A[0][0] + (long long)A[0][1] + (long long)A[1][0] +
          (long long)A[1][1] !=
      all)
    return false;
  len = num[0] + num[1];
  for (int i = 1; i <= len; ++i) {
    if (num[0] && A[0][1] >= num[1])
      ans[i] = 0, --num[0], A[0][1] -= num[1];
    else
      ans[i] = 1, --num[1], A[1][0] -= num[0];
  }
  return !A[0][1] && !A[1][0];
}
int main() {
  for (int i = 0; i < 2; ++i)
    for (int j = 0; j < 2; ++j) scanf("%d\n", A[i] + j);
  for (int i = 1; i <= 44721; ++i) M[i * (i - 1) / 2] = i;
  if (work())
    for (int i = 1; i <= len; ++i) printf("%d", ans[i]);
  else
    puts("Impossible");
  return 0;
}
