#include <bits/stdc++.h>
using namespace std;
int mark[1000005];
int binSearch(int x) {
  int esq = 0, dir = 44722;
  while (esq <= dir) {
    int mid = (esq + dir) / 2;
    int val = mid * (mid - 1);
    if (val == 2 * x)
      return mid;
    else if (val > 2 * x)
      dir = mid - 1;
    else
      esq = mid + 1;
  }
  return -1;
}
int main() {
  cout.sync_with_stdio(0);
  cin.tie(0);
  int a, b, c, d;
  cin >> a >> b >> c >> d;
  int numZero = binSearch(a), numUm = binSearch(d);
  if (a + b + c + d == 0) {
    cout << "0" << endl;
    return 0;
  }
  if (a + b + c == 0) numZero = 0;
  if (b + c + d == 0) numUm = 0;
  if (a == 0 and d == 0 and b + c == 1) {
    if (b == 1) {
      cout << "01" << endl;
      return 0;
    }
    if (c == 1) {
      cout << "10" << endl;
      return 0;
    }
  }
  if (b + c != numZero * numUm || numZero == -1 || numUm == -1) {
    cout << "Impossible" << endl;
    return 0;
  }
  deque<char> dq;
  int aux = numZero, sum = 0;
  for (int i = 0; i < numZero + numUm; i++) {
    if (sum + aux <= b)
      dq.push_front('1'), sum += aux;
    else
      dq.push_front('0'), aux--;
  }
  for (char c : dq) cout << c;
  cout << endl;
  return 0;
}
