#include <bits/stdc++.h>
using namespace std;
unordered_map<long long, int> p;
int main() {
  long long a, b, c, d;
  scanf("%I64d %I64d %I64d %I64d", &a, &b, &c, &d);
  for (long long i = 1; i <= 89443; i++) {
    long long x = i * (i - 1) / 2;
    p[x] = i;
  }
  if (a + b + c + d == 0) {
    puts("1");
    return 0;
  }
  if (a + b + c == 0) {
    if (p[d] == 0)
      puts("Impossible");
    else
      for (int i = 0; i < p[d]; i++) printf("1");
    return 0;
  } else if (b + c + d == 0) {
    if (p[a] == 0)
      puts("Impossible");
    else
      for (int i = 0; i < p[a]; i++) printf("0");
    return 0;
  }
  if (!p[a + b + c + d] || p[a] == 0 || p[d] == 0 || b + c != p[a] * p[d]) {
    puts("Impossible");
    return 0;
  }
  int num_z = p[a];
  int num_o = p[d];
  int diff = num_z * num_o - b;
  for (int i = 0; i < diff / num_z; i++) {
    printf("1");
    num_o--;
  }
  for (int i = 0; i < num_z - (diff % num_z); i++) printf("0");
  if (num_o > 0) {
    printf("1");
    num_o--;
  }
  num_z -= (num_z - diff % num_z);
  for (int i = 0; i < num_z; i++) printf("0");
  for (int i = 0; i < num_o; i++) printf("1");
  return 0;
}
