#include <bits/stdc++.h>
using namespace std;
long long find_cnt(long long a) {
  a *= 2;
  long long low = 1, high = (long long)1e9, mid;
  while (low <= high) {
    mid = (low + high) / 2LL;
    long long tmp = mid * mid - mid;
    if (tmp == a)
      return mid;
    else if (tmp > a)
      high = mid - 1;
    else
      low = mid + 1;
  }
  return -1;
}
int A[(int)1e6 + 1] = {};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long a00, a01, a10, a11;
  cin >> a00 >> a01 >> a10 >> a11;
  long long ones = find_cnt(a11), zeros = find_cnt(a00);
  if (ones == -1 || zeros == -1) {
    cout << "Impossible\n";
    return 0;
  }
  if (a01 + a10 != ones * zeros && !(a01 + a10 == 0 && (!a00 || !a11))) {
    cout << "Impossible\n";
    return 0;
  } else if (a01 + a10 == 0 && a01 + a10 != ones * zeros && (!a00 || !a11)) {
    if (a11 == 0)
      ones = 0;
    else
      zeros = 0;
  }
  long long tmp10 = 0;
  int onesLeft = ones;
  for (int x = 0; x < ones; x++) {
    if (tmp10 + zeros < a10)
      A[x] = 1, tmp10 += zeros;
    else {
      long long pos = zeros - 1 + x;
      long long tmp = a10 - tmp10;
      onesLeft = ones - 1 - x;
      A[pos - tmp + 1] = 1;
      break;
    }
  }
  for (int x = ones + zeros - 1; onesLeft > 0; x--, onesLeft--) A[x] = 1;
  for (int x = 0; x < ones + zeros; x++) cout << A[x];
  cout << '\n';
}
