#include <bits/stdc++.h>
using namespace std;
const long long mod = 20071027;
const double pi = acos(1.0 * (-1));
int p[1001111];
long long fun(long long x) {
  long long dt = 1 + 8 * x;
  long long t = sqrt(dt * 1.0) + 0.0000001;
  if (t * t != dt) return -1;
  return (1 + t) / 2;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long n00, n01, n10, n11;
  cin >> n00 >> n01 >> n10 >> n11;
  long long n1, n0;
  n1 = fun(n11);
  n0 = fun(n00);
  if (n00 + n01 + n10 + n11 == 0) {
    cout << "1";
    return 0;
  }
  if (n1 == -1 || n0 == -1) {
    cout << "Impossible";
    return 0;
  }
  if (n01 + n10 == 0) {
    if (n0 == 1)
      for (int i = 0; i < n1; i++) cout << "1";
    else if (n1 == 1)
      for (int i = 0; i < n0; i++) cout << "0";
    else
      cout << "Impossible";
    return 0;
  }
  if (n01 + n10 != n0 * n1) {
    cout << "Impossible";
    return 0;
  }
  if (n01 > n0) {
    p[n0] = n01 / n0;
    n01 -= n0 * p[n0];
    n1 -= p[n0];
  }
  if (n1) {
    p[n01]++;
    n1--;
  }
  p[0] += n1;
  for (int i = 0; i < n0; i++) {
    for (int j = 0; j < p[i]; j++) cout << "1";
    cout << "0";
  }
  for (int i = 0; i < p[n0]; i++) cout << "1";
  return 0;
}
