#include <bits/stdc++.h>
using namespace std;
int p[1000005], ans[1000005], a, b, c, d;
int main() {
  int n;
  cin >> a >> b >> c >> d;
  if (a == b && b == c && c == d && d == 0) return cout << 1, 0;
  int num0 = -1, num1 = -1;
  for (int i = 0; i * (i - 1) <= a * 2; ++i)
    if (i * (i - 1) == a * 2) num0 = i;
  for (int i = 0; i * (i - 1) <= d * 2; ++i)
    if (i * (i - 1) == d * 2) num1 = i;
  if (a == 0 && b == 0 && c == 0) num0 = 0;
  if (b == 0 && c == 0 && d == 0) num1 = 0;
  if (num0 == -1 || num1 == -1) return cout << "Impossible", 0;
  int sum = b + num1 * (num1 + 1) / 2;
  if (sum != num1 * (num1 + 1) / 2 + num0 * num1 - c)
    return cout << "Impossible", 0;
  for (int i = 1; i <= num1; ++i) p[i] = i, sum -= i;
  if (sum < 0) return cout << "Impossible", 0;
  int lim = num1 + num0 + 1;
  for (int i = num1; i >= 1; --i) {
    lim--;
    int val = min(sum, lim - p[i]);
    sum -= val;
    p[i] += val;
    ans[p[i]] = 1;
  }
  if (sum > 0) return cout << "Impossible", 0;
  for (int i = 1; i <= num1 + num0; ++i) cout << ans[i];
}
