#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, c, d;
  cin >> a >> b >> c >> d;
  if (a == 0 && b == 0 && c == 0 && d == 0) {
    cout << "0";
    return 0;
  }
  if (a == 0 && d == 0) {
    if (b != 0) {
      if (c != 0)
        cout << "Impossible";
      else if (b == 1)
        cout << "01";
      else
        cout << "Impossible";
      return 0;
    }
    if (c == 1)
      cout << "10";
    else
      cout << "Impossible";
    return 0;
  }
  long long x = sqrt(1 + 8 * a);
  long long y = sqrt(1 + 8 * d);
  if (x * x != 1 + 8 * a || y * y != 1 + 8 * d) {
    cout << "Impossible";
    return 0;
  }
  if ((1 + x) % 2 != 0 || (1 + y) % 2 != 0) {
    cout << "Impossible";
    return 0;
  }
  long long c0 = (1 + x) / 2;
  long long c1 = (1 + y) / 2;
  if (b + c == 0 && c0 && c1) {
    if (c0 == 1)
      c0 = 0;
    else if (c1 == 1)
      c1 = 0;
    else {
      cout << "Impossible";
      return 0;
    }
  } else if (c0 * c1 != b + c) {
    cout << "Impossible";
    return 0;
  }
  if (c0 == 0) {
    for (long long i = 0; i < c1; ++i) cout << "1";
    return 0;
  }
  if (c1 == 0) {
    for (long long i = 0; i < c0; ++i) cout << "0";
    return 0;
  }
  string S, A;
  long long temp = b / c1;
  for (long long i = 0; i < temp; ++i) S.push_back('0');
  temp = b % c1;
  for (long long i = 0; i < temp; ++i) A.push_back('1');
  for (long long i = 0; i < c1 - temp; ++i) S.push_back('1');
  if (c0 && b % c1) S.push_back('0');
  if (b % c1)
    temp = max(c0 - b / c1 - 1, (long long)0);
  else
    temp = max(c0 - b / c1, (long long)0);
  for (long long i = 0; i < temp; ++i) A.push_back('0');
  S = S + A;
  cout << S;
  return 0;
}
