#include <bits/stdc++.h>
using namespace std;
long long a[4];
long long zero, one;
vector<long long> c;
vector<char> ans;
int main() {
  ios::sync_with_stdio(false);
  for (long long i = 0; (i * (i - 1LL)) <= 5000000000LL; i++) {
    c.push_back((i * (i - 1LL)) / 2LL);
  }
  for (int i = 0; i < 4; i++) {
    cin >> a[i];
  }
  bool poss = true;
  if (a[0] == 0 && a[1] == 0 && a[2] == 0 && a[3] == 0) {
    cout << 0;
    return 0;
  }
  if (a[0] == 1 && a[1] == 0 && a[2] == 0 && a[3] == 0) {
    cout << "00";
    return 0;
  }
  if (a[0] == 0 && a[1] == 0 && a[2] == 0 && a[3] == 1) {
    cout << "11";
    return 0;
  }
  if (a[0] == 0 && a[1] == 1 && a[2] == 0 && a[3] == 0) {
    cout << "01";
    return 0;
  }
  if (a[0] == 0 && a[1] == 0 && a[2] == 1 && a[3] == 0) {
    cout << "10";
    return 0;
  }
  if (1) {
    if (a[0] > a[3]) {
      int index = lower_bound(c.begin(), c.end(), a[0]) - c.begin();
      if (c[index] == a[0]) {
        zero = index;
      } else {
        poss = false;
      }
      if (a[3] == 0) {
        if (a[2] > 0 || a[1] > 0) {
          one = 1;
        } else {
          one = 0;
        }
      } else {
        index = lower_bound(c.begin(), c.end(), a[3]) - c.begin();
        if (c[index] == a[3]) {
          one = index;
        } else {
          poss = false;
        }
      }
    } else {
      int index = lower_bound(c.begin(), c.end(), a[3]) - c.begin();
      if (c[index] == a[3]) {
        one = index;
      } else {
        poss = false;
      }
      if (a[0] == 0) {
        if (a[2] > 0 || a[1] > 0) {
          zero = 1;
        } else {
          zero = 0;
        }
      } else {
        index = lower_bound(c.begin(), c.end(), a[0]) - c.begin();
        if (c[index] == a[0]) {
          zero = index;
        } else {
          poss = false;
        }
      }
    }
  }
  for (int i = 1; i <= zero; i++) {
    ans.push_back('0');
  }
  for (int i = 1; i <= one; i++) {
    ans.push_back('1');
  }
  int back = zero;
  long long total = zero * one;
  if (total != a[1] + a[2]) {
    poss = false;
  } else {
    long long bc = a[2];
    int index = zero;
    while (bc) {
      if (bc > back) {
        swap(ans[index], ans[index - back]);
        index++;
        bc -= back;
      } else {
        swap(ans[index], ans[index - bc]);
        index++;
        bc = 0;
        break;
      }
    }
  }
  if (ans.size() == 0) {
    ans.push_back('0');
  }
  if (poss == false) {
    cout << "Impossible\n";
  } else {
    for (auto anss : ans) cout << anss;
  }
  return 0;
}
