#include <bits/stdc++.h>
using namespace std;
const int maxint = numeric_limits<int>::max();
const long long maxll = numeric_limits<long long>::max();
vector<int> prf_fun(string s) {
  int n = (int)s.length();
  vector<int> a(n, 0);
  for (int i = 1; i < n; i++) {
    int j = a[i - 1];
    while (j > 0 && s[i] != s[j]) j = a[j - 1];
    if (s[i] == s[j]) j++;
    a[i] = j;
  }
  return a;
}
template <typename xab>
inline xab sqr(xab n) {
  return n * n;
}
string ans = "";
long long a00, a01, a10, a11, a0, a1;
void zdvig(int n) {
  ans = ans + '0';
  for (int i = ans.length() - 1; i > n; i--) ans[i] = ans[i - 1];
  ans[n] = '1';
}
bool chk() {
  int b00 = 0;
  int b01 = 0;
  int b10 = 0;
  int b11 = 0;
  int r1 = 0;
  int r0 = 0;
  for (int i = 0; i < ans.length(); i++)
    if (ans[i] == '1')
      r1++;
    else
      r0++;
  for (int i = 0; i < ans.length(); i++) {
    if (ans[i] == '1') {
      r1--;
      b11 += r1;
      b10 += r0;
    } else {
      r0--;
      b00 += r0;
      b01 += r1;
    }
  }
  return (b01 == a01 && b10 == a10 && b11 == a11 && b00 == a00);
}
void to_do() {
  string targ = "";
  if (a00 != 0 && a01 == 0 && a10 == 0 && a11 == 0) {
    for (int i = 0; i < a0; i++) ans = ans + '0';
    if (chk()) cout << ans;
    exit(0);
  }
  if (a00 == 0 && a01 != 0 && a10 == 0 && a11 == 0) {
    cout << (a01 == 1 ? "01" : "Impossible");
    exit(0);
  }
  if (a00 == 0 && a01 == 0 && a10 != 0 && a11 == 0) {
    cout << (a10 == 1 ? "10" : "Impossible");
    exit(0);
  }
  if (a00 == 0 && a01 == 0 && a10 == 0 && a11 != 0) {
    for (int i = 0; i < a1; i++) ans = ans + '1';
    if (chk()) cout << ans;
    exit(0);
  }
}
int main() {
  cin >> a00 >> a01 >> a10 >> a11;
  if (sqrt(1 + 8 * a11) - (int)sqrt(1 + 8 * a11) > 0.0000000000001)
    return cout << "Impossible", 0;
  if (sqrt(1 + 8 * a00) - (int)sqrt(1 + 8 * a00) > 0.0000000000001)
    return cout << "Impossible", 0;
  a0 = (1 + sqrt(1 + 8 * a00)) / 2;
  a1 = (1 + sqrt(1 + 8 * a11)) / 2;
  to_do();
  if (a00 == 0 && a11 == 0) {
    if (a01 == 0)
      return cout << 0, 0;
    else
      return cout << "Impossible", 0;
  }
  for (int i = 0; i < a0; i++) ans += '0';
  for (int i = 0; i < a01 / a0; i++) ans = ans + '1';
  if (a01 % a0 != 0) zdvig(a01 % a0);
  for (int i = 0; i < a1 - (a01 / a0 + (a01 % a0 != 0)); i++) ans = '1' + ans;
  if (chk())
    cout << ans << '\n';
  else
    cout << "Impossible";
  return 0;
}

### Prompt

Your challenge is to write 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 int maxint = numeric_limits<int>::max();
const long long maxll = numeric_limits<long long>::max();
vector<int> prf_fun(string s) {
  int n = (int)s.length();
  vector<int> a(n, 0);
  for (int i = 1; i < n; i++) {
    int j = a[i - 1];
    while (j > 0 && s[i] != s[j]) j = a[j - 1];
    if (s[i] == s[j]) j++;
    a[i] = j;
  }
  return a;
}
template <typename xab>
inline xab sqr(xab n) {
  return n * n;
}
string ans = "";
long long a00, a01, a10, a11, a0, a1;
void zdvig(int n) {
  ans = ans + '0';
  for (int i = ans.length() - 1; i > n; i--) ans[i] = ans[i - 1];
  ans[n] = '1';
}
bool chk() {
  int b00 = 0;
  int b01 = 0;
  int b10 = 0;
  int b11 = 0;
  int r1 = 0;
  int r0 = 0;
  for (int i = 0; i < ans.length(); i++)
    if (ans[i] == '1')
      r1++;
    else
      r0++;
  for (int i = 0; i < ans.length(); i++) {
    if (ans[i] == '1') {
      r1--;
      b11 += r1;
      b10 += r0;
    } else {
      r0--;
      b00 += r0;
      b01 += r1;
    }
  }
  return (b01 == a01 && b10 == a10 && b11 == a11 && b00 == a00);
}
void to_do() {
  string targ = "";
  if (a00 != 0 && a01 == 0 && a10 == 0 && a11 == 0) {
    for (int i = 0; i < a0; i++) ans = ans + '0';
    if (chk()) cout << ans;
    exit(0);
  }
  if (a00 == 0 && a01 != 0 && a10 == 0 && a11 == 0) {
    cout << (a01 == 1 ? "01" : "Impossible");
    exit(0);
  }
  if (a00 == 0 && a01 == 0 && a10 != 0 && a11 == 0) {
    cout << (a10 == 1 ? "10" : "Impossible");
    exit(0);
  }
  if (a00 == 0 && a01 == 0 && a10 == 0 && a11 != 0) {
    for (int i = 0; i < a1; i++) ans = ans + '1';
    if (chk()) cout << ans;
    exit(0);
  }
}
int main() {
  cin >> a00 >> a01 >> a10 >> a11;
  if (sqrt(1 + 8 * a11) - (int)sqrt(1 + 8 * a11) > 0.0000000000001)
    return cout << "Impossible", 0;
  if (sqrt(1 + 8 * a00) - (int)sqrt(1 + 8 * a00) > 0.0000000000001)
    return cout << "Impossible", 0;
  a0 = (1 + sqrt(1 + 8 * a00)) / 2;
  a1 = (1 + sqrt(1 + 8 * a11)) / 2;
  to_do();
  if (a00 == 0 && a11 == 0) {
    if (a01 == 0)
      return cout << 0, 0;
    else
      return cout << "Impossible", 0;
  }
  for (int i = 0; i < a0; i++) ans += '0';
  for (int i = 0; i < a01 / a0; i++) ans = ans + '1';
  if (a01 % a0 != 0) zdvig(a01 % a0);
  for (int i = 0; i < a1 - (a01 / a0 + (a01 % a0 != 0)); i++) ans = '1' + ans;
  if (chk())
    cout << ans << '\n';
  else
    cout << "Impossible";
  return 0;
}

```