#include <bits/stdc++.h>
using namespace std;
int a[100005];
int main() {
  long long a00, a01, a10, a11, x = 1, y = 1;
  cin >> a00 >> a01 >> a10 >> a11;
  if (a00 == 0 && a10 == 0 && a01 == 0 && a11 == 0) {
    cout << 0 << endl;
    return 0;
  }
  while (true) {
    if ((x * (x - 1)) / 2 >= a00) break;
    x++;
  }
  while (true) {
    if ((y * (y - 1)) / 2 >= a11) break;
    y++;
  }
  if ((x * (x - 1)) / 2 != a00 || (y * (y - 1)) / 2 != a11) {
    cout << "Impossible" << endl;
    return 0;
  }
  if (x == 1 || y == 1) {
    if (a01 + a10 != x * y && a01 + a10 != 0) {
      cout << "Impossible" << endl;
      return 0;
    }
    if (a01 + a10 == 0) {
      if (x == 1) x = 0;
      if (y == 1) y = 0;
    }
  } else if (x > 1 && y > 1 && a01 + a10 != x * y) {
    cout << "Impossible" << endl;
    return 0;
  }
  string s = "";
  if (x == 0) {
    for (int i = 1; i <= y; i++) {
      cout << 1;
    }
    cout << endl;
    return 0;
  }
  if (y == 0) {
    for (int i = 1; i <= x; i++) {
      cout << 0;
    }
    cout << endl;
    return 0;
  }
  long long num1 = a10 / x;
  while (num1--) {
    s += '1';
    y--;
  }
  num1 = a10 % x;
  while (x > num1) {
    s += '0';
    x--;
  }
  if (y > 0) s += '1', y--;
  while (x--) {
    s += '0';
  }
  while (y--) {
    s += '1';
  }
  cout << s << endl;
}
