#include <bits/stdc++.h>
using namespace std;
long long gcd_ll(long long a, long long b) { return a ? gcd_ll(b % a, a) : b; }
long long lcm_ll(long long a, long long b) { return (a / gcd_ll(a, b)) * b; }
int gcd(int a, int b) { return a ? gcd(b % a, a) : b; }
int lcm(int a, int b) { return (a / gcd(a, b)) * b; }
string int_to_str_easy(long long n) {
  return n ? "" : int_to_str_easy(n / 10) + (char)('0' + n % 10);
}
long long sum(vector<long long> v) {
  long long ans = 0;
  for (long long i : v) ans += i;
  return ans;
}
bool is_down(char x) { return ('a' <= x && x <= 'z'); }
bool is_upper(char x) { return ('A' <= x && x <= 'Z'); }
bool is_digit(char x) { return ('0' <= x && x <= '9'); }
string follow(string s) {
  for (int i = 0; i < s.length(); i++)
    if (is_upper(s[i])) s[i] += 'a' - 'A';
  return s;
}
const long double pi = 3.141592653589793238462643383279;
const long double log23 = 1.58496250072115618145373894394781;
const long double eps = 1e-8;
const long double zero = 0;
const long long INF = 1e18;
const int COUT = 30;
const int prost = 239;
const long long prost64 = 239;
const long long MOD = 1000000007;
const int BIG = 1e9;
const int alf = 26;
const int MAX_N = 1e5 + 1;
const int MAX_M = 501;
const int km = (1 << 18) - 1;
const int dxo[8] = {-1, -1, -1, 0, 1, 1, 1, 0};
const int dyo[8] = {-1, 0, 1, 1, 1, 0, -1, -1};
const int dx[4] = {-1, 0, 1, 0};
const int dy[4] = {0, 1, 0, -1};
void solve() { return; }
long long number(long long x) {
  long long d = 1 + 8 * x;
  if (sqrt(d) != trunc(sqrt(d))) return -1;
  d = trunc(sqrt(d));
  return (1 + d) / 2;
}
void fail() {
  cout << "Impossible";
  exit(0);
}
void go(string s) {
  cout << s;
  exit(0);
}
int main() {
  cin.sync_with_stdio(0);
  long long a00, a01, a10, a11;
  cin >> a00 >> a01 >> a10 >> a11;
  if (a00 == 0 && a01 == 0 && a10 == 0 && a11 == 0) go("0");
  if (a00 == 0 && a11 == 0) {
    if (a10 != 0 && a01 != 0) fail();
    if (a01 > 1) fail();
    if (a10 > 1) fail();
    if (a01 == 1)
      go("01");
    else
      go("10");
  }
  if (a01 == 0 && a10 == 0) {
    if (a11 != 0 && a00 != 0) fail();
    if (number(a00) == -1) fail();
    if (number(a11) == -1) fail();
    if (a00 == 0) {
      long long kol = number(a11);
      for (int i = 0; i < kol; i++) cout << 1;
      return 0;
    } else {
      long long kol = number(a00);
      for (int i = 0; i < kol; i++) cout << 0;
      return 0;
    }
  }
  if (a00 == 0) {
    long long kol = a01 + a10;
    if (a11 != (kol * (kol - 1)) / 2) fail();
    for (int i = 0; i < a10; i++) cout << 1;
    cout << 0;
    for (int i = 0; i < a01; i++) cout << 1;
    return 0;
  }
  if (a11 == 0) {
    long long kol = a01 + a10;
    if (a00 != (kol * (kol - 1)) / 2) fail();
    for (int i = 0; i < a01; i++) cout << 0;
    cout << 1;
    for (int i = 0; i < a10; i++) cout << 0;
    return 0;
  }
  long long k0 = number(a00);
  long long k1 = number(a11);
  if (a01 == 0) {
    if (a10 != k1 * k0) fail();
    for (int i = 0; i < k1; i++) cout << 1;
    for (int i = 0; i < k0; i++) cout << 0;
    return 0;
  }
  if (a10 == 0) {
    if (a01 != k1 * k0) fail();
    for (int i = 0; i < k0; i++) cout << 0;
    for (int i = 0; i < k1; i++) cout << 1;
    return 0;
  }
  long long n = k0 + k1;
  if (a01 + a10 + a00 + a11 != (n * (n - 1)) / 2) fail();
  if (a01 + a10 != k0 * k1) fail();
  string s;
  while (k0 + k1) {
    if (a01 >= k1) {
      cout << 0;
      a01 -= k1;
      k0--;
    } else {
      cout << 1;
      a10 -= k0;
      k1--;
    }
  }
  return 0;
}
