#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-9;
const double pi = acos(-1.0);
const int mod = 1e9 + 7;
int a, b, c, d;
int ans[1000002];
int main() {
  cin >> a >> b >> c >> d;
  int num0 = -1, num1 = -1;
  if (a == 0) {
    if (b == 0 && c == 0)
      num0 = 0;
    else
      num0 = 1;
  } else {
    for (int i = 2;; i++) {
      if (i * (i - 1) / 2 == a) {
        num0 = i;
        break;
      }
      if (i * (i - 1) / 2 > a) break;
    }
  }
  if (d == 0) {
    if (b == 0 && c == 0)
      num1 = 0;
    else
      num1 = 1;
  } else {
    for (int i = 2;; i++) {
      if (i * (i - 1) / 2 == d) {
        num1 = i;
        break;
      }
      if (i * (i - 1) / 2 > d) break;
    }
  }
  if (num0 == -1 || num1 == -1)
    printf("Impossible\n");
  else {
    if (num0 == 0 && num1 == 0)
      printf("0\n");
    else if (num0 == 0 || num1 == 0) {
      for (int i = 0; i < num0; i++) printf("0");
      for (int i = 0; i < num1; i++) printf("1");
      printf("\n");
    } else {
      for (int i = 0; i < num1; i++) ans[i] = 1;
      int bb = 0, cc = num1 * num0;
      for (int i = num1; i < num1 + num0; i++) {
        if (cc <= c) break;
        if (cc - c >= num1) {
          ans[i - num1] = 0;
          ans[i] = 1;
          cc -= num1;
          bb += num1;
        } else {
          int k = cc - c;
          ans[i - k] = 0;
          ans[i] = 1;
          cc -= k;
          bb += k;
        }
      }
      if (cc == c && bb == b) {
        for (int i = 0; i < num0 + num1; i++) printf("%d", ans[i]);
        printf("\n");
      } else
        printf("Impossible\n");
    }
  }
  return 0;
}
