#include <bits/stdc++.h>
using namespace std;
void smain();
int main() {
  ios_base::sync_with_stdio(0);
  smain();
  return 0;
}
long long a[4];
inline long long f(long long c) {
  if (c == 0) return 1;
  long long z = (1 + sqrt(1 + 8 * c)) / 2;
  for (; z * (z - 1) / 2 < c; ++z)
    ;
  if (z * (z - 1) / 2 == c) return z;
  return -1;
}
string solve() {
  long long sum = 0;
  for (long long i = 0; i < 4; i++) sum += a[i];
  long long z = f(a[0]), o = f(a[3]);
  if (z == -1 || o == -1) return "Impossible";
  if (a[0] == sum) return string(z, '0');
  if (a[3] == sum) return string(o, '1');
  if (sum == 1) {
    if (a[1] == 1)
      return "01";
    else
      return "10";
  }
  if (z == -1 || o == -1 || z * o != a[1] + a[2]) return "Impossible";
  long long k = a[2] / z;
  long long x = k * z;
  string res;
  for (long long i = 0; i < k; i++) res.push_back('1');
  for (long long i = 0; i < z; i++) res.push_back('0');
  for (long long i = k; i < o; ++i) res.push_back('1');
  long long i = k + z;
  for (; x < a[2]; --i, ++x) swap(res[i], res[i - 1]);
  return res;
}
vector<long long> calc(const string &s) {
  vector<long long> res(4);
  long long n = (long long)s.length();
  for (long long i = 0; i < n; i++) {
    for (long long j = i + 1; j < n; ++j) {
      if (s[i] == '0') {
        if (s[j] == '1')
          res[1] += 1;
        else
          res[0] += 1;
      } else {
        if (s[j] == '1')
          res[3] += 1;
        else
          res[2] += 1;
      }
    }
  }
  return res;
}
void smain() {
  for (; cin >> a[0];) {
    for (long long i = 0; i < 3; i++) cin >> a[i + 1];
    string s = solve();
    cout << s << endl;
  }
}
