#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long maxn = 1e5 + 7;
const long long maxe = 1e6 + 7;
const long long INF = 1e9 + 7;
const double PI = acos(-1);
int dx[4] = {0, 0, 1, -1};
int dy[4] = {-1, 1, 0, 0};
inline void Max(int &a, int b) {
  if (b > a) a = b;
}
inline void Min(int &a, int b) {
  if (a == -1 || b < a) a = b;
}
int n;
long long a, b, c, d;
long long L[maxe];
int l1, l2;
int getl(long long a) {
  int t = lower_bound(L + 1, L + maxe, a) - L;
  if (L[t] == a) return t;
  return -1;
}
string solve() {
  string res = "Impossible";
  if (a == 0) {
    if (b || c)
      l1 = 1;
    else
      l1 = 0;
  } else
    l1 = getl(a);
  if (d == 0) {
    if (b || c)
      l2 = 1;
    else
      l2 = 0;
  } else
    l2 = getl(d);
  if (l1 == -1 || l2 == -1) return res;
  if (L[l1 + l2] != a + b + c + d) return res;
  res = "";
  for (int i = 0; i < l1; i++) {
    while (l2 > b) {
      res += '1';
      l2--;
    }
    b -= l2;
    res += '0';
  }
  while (l2) {
    res += '1';
    l2--;
  }
  if (res == "") res = "0";
  return res;
}
int main() {
  for (int i = 1; i < maxe; i++) L[i] = 1ll * i * (i - 1) / 2;
  cin >> a >> b >> c >> d;
  cout << solve() << endl;
  return 0;
}

### Prompt

Please formulate a CPP solution to the following problem:

For each string s consisting of characters '0' and '1' one can define four integers a00, a01, a10 and a11, where axy is the number of subsequences of length 2 of the string s equal to the sequence {x, y}. 

In these problem you are given four integers a00, a01, a10, a11 and have to find any non-empty string s that matches them, or determine that there is no such string. One can prove that if at least one answer exists, there exists an answer of length no more than 1 000 000.

Input

The only line of the input contains four non-negative integers a00, a01, a10 and a11. Each of them doesn't exceed 109.

Output

If there exists a non-empty string that matches four integers from the input, print it in the only line of the output. Otherwise, print "Impossible". The length of your answer must not exceed 1 000 000.

Examples

Input

1 2 3 4


Output

Impossible


Input

1 2 2 1


Output

0110

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long maxn = 1e5 + 7;
const long long maxe = 1e6 + 7;
const long long INF = 1e9 + 7;
const double PI = acos(-1);
int dx[4] = {0, 0, 1, -1};
int dy[4] = {-1, 1, 0, 0};
inline void Max(int &a, int b) {
  if (b > a) a = b;
}
inline void Min(int &a, int b) {
  if (a == -1 || b < a) a = b;
}
int n;
long long a, b, c, d;
long long L[maxe];
int l1, l2;
int getl(long long a) {
  int t = lower_bound(L + 1, L + maxe, a) - L;
  if (L[t] == a) return t;
  return -1;
}
string solve() {
  string res = "Impossible";
  if (a == 0) {
    if (b || c)
      l1 = 1;
    else
      l1 = 0;
  } else
    l1 = getl(a);
  if (d == 0) {
    if (b || c)
      l2 = 1;
    else
      l2 = 0;
  } else
    l2 = getl(d);
  if (l1 == -1 || l2 == -1) return res;
  if (L[l1 + l2] != a + b + c + d) return res;
  res = "";
  for (int i = 0; i < l1; i++) {
    while (l2 > b) {
      res += '1';
      l2--;
    }
    b -= l2;
    res += '0';
  }
  while (l2) {
    res += '1';
    l2--;
  }
  if (res == "") res = "0";
  return res;
}
int main() {
  for (int i = 1; i < maxe; i++) L[i] = 1ll * i * (i - 1) / 2;
  cin >> a >> b >> c >> d;
  cout << solve() << endl;
  return 0;
}

```