#include <bits/stdc++.h>
using namespace std;
const int SZ = 1000010, INF = 0x7FFFFFFF;
int main() {
  std::ios::sync_with_stdio(0);
  long long a00, a01, a10, a11;
  cin >> a00 >> a01 >> a10 >> a11;
  bool ok1 = 0, ok2 = 0;
  long long sq1 = sqrt(a00 * 2), sq2 = sqrt(a11 * 2);
  if (sq1 * (sq1 + 1) == 2 * a00) ok1 = 1;
  if (sq2 * (sq2 + 1) == 2 * a11) ok2 = 1;
  long long num0 = sq1 + 1, num1 = sq2 + 1;
  if (a00 == 0 && a01 == 0 && a10 == 0) num0 = 0;
  if (a11 == 0 && a01 == 0 && a10 == 0) num1 = 0;
  if (num0 == num1 && num0 == 0)
    cout << 0 << endl;
  else if (ok1 && ok2) {
    if (a01 + a10 != num0 * num1)
      cout << "Impossible" << endl;
    else if (num0 == 0) {
      cout << string(num1, '1') << endl;
    } else if (num1 == 0) {
      cout << string(num0, '0') << endl;
    } else {
      string str(num0, '0');
      long long right1num = a01 / num0;
      long long rem = num1 - right1num;
      str += string(right1num, '1');
      long long stillneed01 = a01 - num0 * (a01 / num0);
      for (int i = (int)str.size() - right1num - 1, j = 1; i >= 0; --i, ++j) {
        long long cur0 = num0 - j;
        if (cur0 == 0) {
          str = string(rem, '1') + str;
          break;
        }
        int right1num = stillneed01 / cur0;
        str.insert(str.begin() + i, right1num, '1');
        stillneed01 -= cur0 * right1num;
        rem -= right1num;
      }
      cout << str << endl;
    }
  } else
    cout << "Impossible" << endl;
  return 0;
}

### Prompt

Construct a Cpp code solution to the problem outlined:

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 SZ = 1000010, INF = 0x7FFFFFFF;
int main() {
  std::ios::sync_with_stdio(0);
  long long a00, a01, a10, a11;
  cin >> a00 >> a01 >> a10 >> a11;
  bool ok1 = 0, ok2 = 0;
  long long sq1 = sqrt(a00 * 2), sq2 = sqrt(a11 * 2);
  if (sq1 * (sq1 + 1) == 2 * a00) ok1 = 1;
  if (sq2 * (sq2 + 1) == 2 * a11) ok2 = 1;
  long long num0 = sq1 + 1, num1 = sq2 + 1;
  if (a00 == 0 && a01 == 0 && a10 == 0) num0 = 0;
  if (a11 == 0 && a01 == 0 && a10 == 0) num1 = 0;
  if (num0 == num1 && num0 == 0)
    cout << 0 << endl;
  else if (ok1 && ok2) {
    if (a01 + a10 != num0 * num1)
      cout << "Impossible" << endl;
    else if (num0 == 0) {
      cout << string(num1, '1') << endl;
    } else if (num1 == 0) {
      cout << string(num0, '0') << endl;
    } else {
      string str(num0, '0');
      long long right1num = a01 / num0;
      long long rem = num1 - right1num;
      str += string(right1num, '1');
      long long stillneed01 = a01 - num0 * (a01 / num0);
      for (int i = (int)str.size() - right1num - 1, j = 1; i >= 0; --i, ++j) {
        long long cur0 = num0 - j;
        if (cur0 == 0) {
          str = string(rem, '1') + str;
          break;
        }
        int right1num = stillneed01 / cur0;
        str.insert(str.begin() + i, right1num, '1');
        stillneed01 -= cur0 * right1num;
        rem -= right1num;
      }
      cout << str << endl;
    }
  } else
    cout << "Impossible" << endl;
  return 0;
}

```