#include <bits/stdc++.h>
using namespace std;
int mark[1000005];
int binSearch(int x) {
  int esq = 0, dir = 44722;
  while (esq <= dir) {
    int mid = (esq + dir) / 2;
    int val = mid * (mid - 1);
    if (val == 2 * x)
      return mid;
    else if (val > 2 * x)
      dir = mid - 1;
    else
      esq = mid + 1;
  }
  return -1;
}
int main() {
  cout.sync_with_stdio(0);
  cin.tie(0);
  int a, b, c, d;
  cin >> a >> b >> c >> d;
  int numZero = binSearch(a), numUm = binSearch(d);
  if (a + b + c + d == 0) {
    cout << "0" << endl;
    return 0;
  }
  if (a + b + c == 0) numZero = 0;
  if (b + c + d == 0) numUm = 0;
  if (a == 0 and d == 0 and b + c == 1) {
    if (b == 1) {
      cout << "01" << endl;
      return 0;
    }
    if (c == 1) {
      cout << "10" << endl;
      return 0;
    }
  }
  if (b + c != numZero * numUm || numZero == -1 || numUm == -1) {
    cout << "Impossible" << endl;
    return 0;
  }
  deque<char> dq;
  int aux = numZero, sum = 0;
  for (int i = 0; i < numZero + numUm; i++) {
    if (sum + aux <= b)
      dq.push_front('1'), sum += aux;
    else
      dq.push_front('0'), aux--;
  }
  for (char c : dq) cout << c;
  cout << endl;
  return 0;
}

### Prompt

Please provide a Cpp coded solution to the problem described below:

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;
int mark[1000005];
int binSearch(int x) {
  int esq = 0, dir = 44722;
  while (esq <= dir) {
    int mid = (esq + dir) / 2;
    int val = mid * (mid - 1);
    if (val == 2 * x)
      return mid;
    else if (val > 2 * x)
      dir = mid - 1;
    else
      esq = mid + 1;
  }
  return -1;
}
int main() {
  cout.sync_with_stdio(0);
  cin.tie(0);
  int a, b, c, d;
  cin >> a >> b >> c >> d;
  int numZero = binSearch(a), numUm = binSearch(d);
  if (a + b + c + d == 0) {
    cout << "0" << endl;
    return 0;
  }
  if (a + b + c == 0) numZero = 0;
  if (b + c + d == 0) numUm = 0;
  if (a == 0 and d == 0 and b + c == 1) {
    if (b == 1) {
      cout << "01" << endl;
      return 0;
    }
    if (c == 1) {
      cout << "10" << endl;
      return 0;
    }
  }
  if (b + c != numZero * numUm || numZero == -1 || numUm == -1) {
    cout << "Impossible" << endl;
    return 0;
  }
  deque<char> dq;
  int aux = numZero, sum = 0;
  for (int i = 0; i < numZero + numUm; i++) {
    if (sum + aux <= b)
      dq.push_front('1'), sum += aux;
    else
      dq.push_front('0'), aux--;
  }
  for (char c : dq) cout << c;
  cout << endl;
  return 0;
}

```