#include <bits/stdc++.h>
using namespace std;
const long double PI = 3.1415926535897932384626433832795029L;
pair<bool, int> f(int n) {
  for (int i = 0;; i++) {
    int x = i * (i - 1) / 2;
    if (x >= n) {
      if (x > n) return make_pair(false, -1);
      return make_pair(true, i);
    }
  }
}
void debug(string &str, int a00, int a01, int a10, int a11) {
  int c1 = 0, c0 = 0;
  for (int i = 0; i < (int)str.size(); i++) {
    if (str[i] == '0') {
      a00 -= c0;
      a10 -= c1;
      c0++;
    } else {
      a01 -= c0;
      a11 -= c1;
      c1++;
    }
  }
  if (a00 or a01 or a10 or a11)
    printf("%s %d %d %d %d\n", str.c_str(), a00, a01, a10, a11);
}
void solve(int n0, int n1, vector<vector<int> > &a) {
  bool valid = false;
  for (int i = 1; i >= 0 and !valid; i--) {
    if (i and n0) continue;
    for (int j = 1; j >= 0 and !valid; j--) {
      if (j and n1) continue;
      if ((n0 + i) * (n1 + j) == a[0][1] + a[1][0]) {
        n0 += i;
        n1 += j;
        valid = true;
      }
    }
  }
  if (n0 * n1 != a[0][1] + a[1][0])
    printf("Impossible\n");
  else {
    string str;
    while (n0 or n1) {
      if (a[0][1] >= n1) {
        str += "0";
        a[0][1] -= n1;
        n0--;
      } else if (a[1][0] >= n0) {
        str += "1";
        a[1][0] -= n0;
        n1--;
      } else
        assert(false);
    }
    cout << str << endl;
  }
}
bool solve(int testNumber) {
  vector<vector<int> > a(2, vector<int>(2));
  for (int i = 0; i < 2; i++)
    for (int j = 0; j < 2; j++)
      if (scanf("%d", &a[i][j]) == EOF) return false;
  int a00 = a[0][0], a01 = a[0][1], a10 = a[1][0], a11 = a[1][1];
  pair<bool, int> p0 = f(a[0][0]), p1 = f(a[1][1]);
  if (!p0.first or !p1.first)
    printf("Impossible\n");
  else {
    int n0 = p0.second, n1 = p1.second;
    solve(n0, n1, a);
  }
  return true;
}
int main() {
  for (int i = 1; solve(i); i++)
    ;
  return 0;
}
