#include <bits/stdc++.h>
using namespace std;
const int inf = 0x20202020;
const long long mod = 1000000007;
const double eps = 1e-9;
const double pi = acos(-1);
long long powmod(long long a, long long b) {
  long long res = 1;
  a %= mod;
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res;
}
int calc(int a) {
  for (int i = 0; (i - 1) * (long long)i <= 2 * a; ++i)
    if ((i - 1) * (long long)i == 2 * a) return i;
  return -1;
}
int a00, a01, a10, a11;
void re() {
  puts("Impossible");
  exit(0);
}
void chk(int c0, int c1) {
  int n = c0 + c1;
  if (n > 1000000) return;
  if (a01 + a10 != (n - 1) * (long long)n / 2 - a00 - a11) return;
  if (c1 == 0) {
    if (a00 == (n - 1) * (long long)n / 2 && a01 == 0 && a10 == 0 && a11 == 0) {
      cout << string(n, '0') << endl;
      exit(0);
    } else
      return;
  }
  int y = a01 % c1, x = a01 / c1;
  if (x + (y != 0) > c0) return;
  if (y == 0)
    cout << string(x, '0') + string(c1, '1') + string(c0 - x, '0') << endl;
  else
    cout << string(x, '0') + string(c1 - y, '1') + '0' + string(y, '1') +
                string(c0 - x - 1, '0')
         << endl;
  exit(0);
}
int main() {
  cin >> a00 >> a01 >> a10 >> a11;
  if (a00 + a01 + a10 + a11 == 0) cout << "0" << endl, exit(0);
  int c0 = calc(a00), c1 = calc(a11);
  if (c0 == -1 || c1 == -1) re();
  if (c0 == 0 && c1 == 0) {
    chk(0, 0);
    chk(0, 1);
    chk(1, 0);
    chk(1, 1);
    puts("Impossible");
    return 0;
  }
  if (c0 == 0) {
    chk(0, c1), chk(1, c1);
    puts("Impossible");
    return 0;
  }
  if (c1 == 0) {
    chk(c0, 0), chk(c0, 1);
    puts("Impossible");
    return 0;
  }
  chk(c0, c1);
  puts("Impossible");
  return 0;
}
