#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e16;
const string E = "\n";
template <class T>
string TS(T ss) {
  ostringstream oss;
  oss << ss;
  return oss.str();
}
template <class T>
T ABS(T n) {
  return (n >= 0 ? n : -n);
}
template <class T>
T BP(T n, long long int k, long long int mod = 0) {
  T res = 1;
  while (k) {
    if (k & 1) {
      res *= n;
      if (mod) {
        res %= mod;
      }
    }
    n *= n;
    if (mod) {
      n %= mod;
    }
    k >>= 1;
  }
  return res;
}
struct ST {
  long long int v, k, d;
  ST(long long int v, long long int k, long long int d) : v(v), k(k), d(d) {}
  ST(long long int v, long long int k) : v(v), k(k) {}
  ST() {}
  bool operator<(const ST &it) const { return v < it.v; }
};
char buf[(int)1e6 + 10], buf1[(int)1e6 + 10];
long long int n = 0, m = 0, k = 0, mod = 1e9 + 7;
vector<long long int> dx = {0, 1, 0, -1}, dy = {-1, 0, 1, 0};
string s = "";
vector<long long int> vec;
void task() {
  long long int b, d, a;
  long long int a00, a01, a10, a11;
  scanf("%I64d%I64d%I64d%I64d", &a00, &a01, &a10, &a11);
  if (!a00 && !a01 && !a10 && !a11) {
    cout << "0";
    return;
  }
  long long int zer = (long long int)sqrt(1. + 8 * a00),
                one = (long long int)sqrt(1. + 8 * a11);
  if (a00)
    if (zer * zer != 1 + 8 * a00) {
      cout << "Impossible";
      return;
    }
  if (a11)
    if (one * one != 1 + 8 * a11) {
      cout << "Impossible";
      return;
    }
  if (!a00)
    zer = 0;
  else
    zer++;
  if (!a11)
    one = 0;
  else
    one++;
  if (zer & 1 || one & 1 || zer + one > (long long int)1e6) {
    cout << "Impossible";
    return;
  }
  zer /= 2;
  one /= 2;
  if (!zer && !one) {
    if (a01 == 1 && a10 == 0) {
      cout << "01";
      return;
    }
    if (a01 == 0 && a10 == 1) {
      cout << "10";
      return;
    }
    cout << "Impossible";
    return;
  }
  if (!zer) {
    for (int i = 0; i < one; i++) {
      s += "1";
    }
    if (a01 == 0 && a10 == 0) {
      cout << s;
      return;
    }
    for (int i = 0; i <= one; i++) {
      if (one - i == a01 && i == a10) {
        s.insert(i, "0");
        if (s.size() <= (int)1e6) {
          printf("%s", s.c_str());
          return;
        }
      }
    }
    cout << "Impossible";
    return;
  }
  if (!one) {
    for (int i = 0; i < zer; i++) {
      s += "0";
    }
    if (a01 == 0 && a10 == 0) {
      cout << s;
      return;
    }
    for (int i = 0; i <= zer; i++) {
      if (zer - i == a10 && i == a01) {
        s.insert(i, "1");
        if (s.size() <= (int)1e6) {
          printf("%s", s.c_str());
          return;
        }
      }
    }
    cout << "Impossible";
    return;
  }
  for (int i = 0; i < zer; i++) {
    s += "0";
  }
  long long int ka01 = zer * one, ka10 = 0;
  long long int last = one;
  while (ka01 > a01 && ka10 < a10 && last > 0) {
    if (ka01 - a01 >= zer && a10 - ka10 >= zer) {
      s = "1" + s;
      ka01 -= zer;
      ka10 += zer;
    } else {
      k = min(ka01 - a01, a10 - ka10);
      if (k) {
        s.insert(s.size() - k, "1");
        last--;
      }
      ka01 -= k;
      ka10 += k;
      break;
    }
    last--;
  }
  if (ka01 == a01 && ka10 == a10) {
    while (last--) {
      s += "1";
    }
    printf("%s", s.c_str());
  } else {
    cout << "Impossible";
  }
  return;
  vec.resize(n, 0);
  for (int i = 0; i < n; i++) {
    scanf("%I64d", &vec[i]);
  }
}
int main() {
  task();
  return 0;
}
