#include <bits/stdc++.h>
using namespace std;
const int maxn = 1000000 + 23;
const double eps = 1e-6;
long long num[4][4], num0, num1;
int size, a[maxn];
bool check() {
  if ((num[0][0] > 0) || (num[0][1] > 0) || (num[1][0] > 0) || (num[1][1] > 0))
    return true;
  return false;
}
int main() {
  scanf("%I64d%I64d%I64d%I64d", &num[0][0], &num[0][1], &num[1][0], &num[1][1]);
  if (num[0][0] > 0)
    num0 = ((long long)(sqrt(num[0][0] * 8 + 1 + eps)) + 1) / 2;
  else if ((num[0][1] > 0) || (num[1][0] > 0))
    num0 = 1;
  else
    num0 = 0;
  if (num[1][1] > 0)
    num1 = ((long long)(sqrt(num[1][1] * 8 + 1 + eps)) + 1) / 2;
  else if ((num[1][0] > 0) || (num[0][1] > 0))
    num1 = 1;
  else
    num1 = 0;
  if (((num0 * (num0 - 1)) / 2 != num[0][0]) ||
      (((num1 - 1) * num1) / 2 != num[1][1])) {
    printf("Impossible\n");
    return 0;
  }
  size = 0;
  while (check()) {
    size++;
    a[size] = -1;
    if ((num0 == 0) && (num1 == 0) && (check())) break;
    if ((num1 <= num[0][1]) && (num0 <= (num[0][0] + 1))) {
      a[size] = 0, num[0][1] -= num1, num[0][0] -= (num0 - 1), num0--;
      continue;
    }
    if ((num0 <= num[1][0]) && (num1 <= (num[1][1] + 1))) {
      a[size] = 1, num[1][0] -= num0, num[1][1] -= (num1 - 1), num1--;
      continue;
    }
    if (a[size] == -1) break;
  }
  if (a[size] == -1) {
    printf("Impossible\n");
    return 0;
  }
  if ((num0 > 1) || (num1 > 1) || ((num0 > 0) && (num1 > 0))) {
    printf("Impossible\n");
    return 0;
  }
  if (num0)
    a[++size] = 0;
  else
    a[++size] = 1;
  for (int i = 1; i <= size; i++) printf("%d", a[i]);
  printf("\n");
  return 0;
}
