#include <bits/stdc++.h>
using namespace std;
const long long int N = 1e5 + 10, N2 = 2e5 + 10, delta = 46639, mod = 1e9 + 7,
                    oo = N - 1, LOG = 20;
const long double PI = 3.141592653589793;
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  long long int a, b, c, d;
  cin >> a >> b >> c >> d;
  long long int x = d;
  x *= 2;
  x = sqrt(x);
  if ((x * (x + 1) / 2) != d) return cout << "Impossible\n", 0;
  x++;
  long long int y = a;
  y *= 2;
  y = sqrt(y);
  if ((y * (y + 1) / 2) != a) return cout << "Impossible\n", 0;
  y++;
  if (x == 1 && y == 1 && b == 0 && c == 0) return cout << 0 << '\n', 0;
  if (x != 1 && y == 1 && b == 0 && c == 0) {
    for (long long int i = 0; i < x; i++) cout << '1';
    cout << '\n';
    return 0;
  }
  if (x == 1 && y != 1 && b == 0 && c == 0) {
    for (long long int i = 0; i < y; i++) cout << '0';
    cout << '\n';
    return 0;
  }
  if ((x * y) != (b + c)) return cout << "Impossible\n", 0;
  string ans = "";
  long long int t = 0;
  while (c >= x) {
    ans += '0';
    t++;
    c -= x;
  }
  if (c) {
    for (long long int i = 0; i < x - c; i++) ans += '1';
    ans += '0';
    t++;
    for (long long int i = 0; i < c; i++) ans += '1';
  } else
    for (long long int i = 0; i < x; i++) ans += '1';
  for (long long int i = 0; i < y - t; i++) ans += '0';
  reverse(ans.begin(), ans.end());
  cout << ans << '\n';
  return 0;
}

### Prompt

Generate 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 int N = 1e5 + 10, N2 = 2e5 + 10, delta = 46639, mod = 1e9 + 7,
                    oo = N - 1, LOG = 20;
const long double PI = 3.141592653589793;
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  long long int a, b, c, d;
  cin >> a >> b >> c >> d;
  long long int x = d;
  x *= 2;
  x = sqrt(x);
  if ((x * (x + 1) / 2) != d) return cout << "Impossible\n", 0;
  x++;
  long long int y = a;
  y *= 2;
  y = sqrt(y);
  if ((y * (y + 1) / 2) != a) return cout << "Impossible\n", 0;
  y++;
  if (x == 1 && y == 1 && b == 0 && c == 0) return cout << 0 << '\n', 0;
  if (x != 1 && y == 1 && b == 0 && c == 0) {
    for (long long int i = 0; i < x; i++) cout << '1';
    cout << '\n';
    return 0;
  }
  if (x == 1 && y != 1 && b == 0 && c == 0) {
    for (long long int i = 0; i < y; i++) cout << '0';
    cout << '\n';
    return 0;
  }
  if ((x * y) != (b + c)) return cout << "Impossible\n", 0;
  string ans = "";
  long long int t = 0;
  while (c >= x) {
    ans += '0';
    t++;
    c -= x;
  }
  if (c) {
    for (long long int i = 0; i < x - c; i++) ans += '1';
    ans += '0';
    t++;
    for (long long int i = 0; i < c; i++) ans += '1';
  } else
    for (long long int i = 0; i < x; i++) ans += '1';
  for (long long int i = 0; i < y - t; i++) ans += '0';
  reverse(ans.begin(), ans.end());
  cout << ans << '\n';
  return 0;
}

```