#include <bits/stdc++.h>
using namespace std;
long long int sq(long long int x) { return x * x; }
long long int sqr(long long int x) {
  if (x <= 1) return x;
  long long int r = sqr(x >> 2);
  if (sq(2 * r + 1) <= x) return 2 * r + 1;
  return 2 * r;
}
void morir() {
  cout << "Impossible" << endl;
  exit(0);
}
long long int sqrc(long long int x) {
  long long int r = sqr(x);
  if (r * r != x) morir();
  return r;
}
long long int solve(long long int x) {
  long long int num = 1 + sqrc(1 + 8 * x);
  if (num % 2 == 1) morir();
  return num / 2;
}
long long int a00, a01, a10, a11;
void intenta(int n0, int n1) {
  if (a01 + a10 != n0 * n1) return;
  if (n1 == 0) {
    cout << string(n0, '0') << endl;
    exit(0);
  } else if (a10 == 0) {
    cout << string(n0, '0') << string(n1, '1') << endl;
    exit(0);
  } else {
    cout << string(a01 / n1, '0') << string(n1 - a01 % n1, '1') << '0'
         << string(a01 % n1, '1') << string(n0 - a01 / n1 - 1, '0') << endl;
    exit(0);
  }
}
int main() {
  cin >> a00 >> a01 >> a10 >> a11;
  long long int n0 = solve(a00);
  long long int n1 = solve(a11);
  if (n0 == 1 and n1 == 1) {
    intenta(0, 1);
    intenta(1, 0);
    intenta(1, 1);
  } else if (n0 == 1) {
    intenta(0, n1);
    intenta(1, n1);
  } else if (n1 == 1) {
    intenta(n0, 0);
    intenta(n0, 1);
  } else {
    intenta(n0, n1);
  }
  morir();
}
