#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:64000000")
const double pi = 3.14159265358979323846;
const double eps = 1e-6;
const long long maxn = 100001;
const long long INF = 1000000007;
const long long mod = 1000000007;
long long a, b, c, d, k0, k1;
string s;
int main() {
  cin >> a >> b >> c >> d;
  if (a + b + c + d == 1) {
    if (a) cout << "00";
    if (b) cout << "01";
    if (c) cout << "10";
    if (d) cout << "11";
    return 0;
  }
  if (a == 0 && b == 0 && c == 0 && d == 0) {
    cout << "0";
    return 0;
  }
  k0 = -1;
  k1 = -1;
  for (long long i = 0; i <= 1000000; i++) {
    if (i * (i - 1) / 2 == a) {
      k0 = i;
      break;
    }
  }
  for (long long i = 0; i <= 1000000; i++) {
    if (i * (i - 1) / 2 == d) {
      k1 = i;
      break;
    }
  }
  if (k0 == -1 || k1 == -1) {
    cout << "Impossible";
    return 0;
  }
  if (k0 == 0) {
    if (b + c == 0) {
      for (int i = 0; i < k1; i++) cout << 1;
      return 0;
    }
    if (b + c != k1) {
      cout << "Impossible";
      return 0;
    }
    string s = "";
    for (int i = 0; i < c; i++) s += '1';
    s += '0';
    for (int i = 0; i < b; i++) s += '1';
    cout << s;
    return 0;
  }
  if (k1 == 0) {
    if (b + c == 0) {
      for (int i = 0; i < k0; i++) cout << 0;
      return 0;
    }
    if (b + c != k0) {
      cout << "Impossible";
      return 0;
    }
    string s = "";
    for (int i = 0; i < b; i++) s += '0';
    s += '1';
    for (int i = 0; i < c; i++) s += '0';
    cout << s;
    return 0;
  }
  if (b + c != k0 * k1) {
    cout << "Impossible";
    return 0;
  }
  for (int i = 0; i < k1 + k0; i++) {
    s += '0';
  }
  long long x = b / k0;
  int tk = 0;
  for (int i = s.length() - 1; tk < x; i--) {
    tk++;
    s[i] = '1';
  }
  long long y = k1 - x;
  if (y == 1)
    s[b - x * k0] = '1';
  else {
    if (b - x * k0 == 0) {
      for (int i = 0; i < y; i++) s[i] = '1';
    } else {
      for (int i = 0; i < y - 1; i++) {
        s[i] = '1';
      }
      int kol = 0;
      for (int i = 0; i < s.length(); i++) {
        if (kol == b - x * k0) {
          s[i] = '1';
          break;
        }
        if (s[i] == '0') kol++;
      }
    }
  }
  cout << s;
  return 0;
}
