#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0);
  cout.tie(0);
  int a00, a01, a10, a11;
  int a, b;
  cin >> a00 >> a01 >> a10 >> a11;
  if (!a00 and !a01 and !a10 and !a11) {
    cout << 0;
    return 0;
  }
  a = sqrt(2 * a11) + 1;
  b = sqrt(2 * a00) + 1;
  if (((a != 0) and ((a * (a - 1)) / 2 != a11)) or
      ((b != 0) and ((b * (b - 1)) / 2 != a00))) {
    cout << "Impossible";
    return 0;
  }
  if (!a00 and !a01 and !a10 and a11) {
    for (int i = 0; i < a; i++) cout << 1;
    return 0;
  }
  if (a00 and !a01 and !a10 and !a11) {
    for (int i = 0; i < b; i++) cout << 0;
    return 0;
  }
  int x = (a01 + a10) / a, b01, b10, l = a + b;
  if (x != b or ((a01 + a10) % a)) {
    cout << "Impossible";
    return 0;
  }
  string s = "";
  b01 = b10 = 0;
  for (int i = 0; i < b / 2; i++) s += '0';
  b01 += a * (b / 2);
  for (int i = 0; i < a; i++) s += '1';
  for (int i = 0; i < b - b / 2; i++) s += '0';
  b10 += a * (b - b / 2);
  int i = b / 2 + a - 1;
  while (b10 > a10) {
    if (l - i - 1 <= b10 - a10) {
      int j = l - 1;
      while (s[j] == '1' and j > i) j--;
      swap(s[i], s[j]);
      b10 -= j - i;
    } else {
      int j = b10 - a10 + i;
      while (s[j] == '1' and j > i) j--;
      swap(s[i], s[j]);
      b10 -= j - i;
    }
    i--;
  }
  i = b / 2;
  while (b10 < a10) {
    if (i <= a10 - b10) {
      int j = 0;
      while (s[j] == '1' and j < i) j++;
      swap(s[i], s[j]);
      b10 += i - j;
    } else {
      int j = i - (a10 - b10);
      while (s[j] == '1' and j < i) j++;
      swap(s[i], s[j]);
      b10 += i - j;
    }
    i++;
  }
  cout << s;
  return 0;
}
