#include <bits/stdc++.h>
using namespace std;
int fn(int x) {
  if (x == 0) return 0;
  int a = sqrt(2 * x);
  if (a * (a + 1) == 2 * x) return a + 1;
  return -1;
}
int gn(int x) {
  if (x == 0) return 1;
  int a = sqrt(2 * x);
  if (a * (a + 1) == 2 * x) return a + 1;
  return -1;
}
int main() {
  int a, b, c, d, num_zeros, num_ones, i, fun_zeros, fun_ones;
  cin >> a >> b >> c >> d;
  num_zeros = fn(a);
  num_ones = fn(d);
  fun_zeros = gn(a);
  fun_ones = gn(d);
  if (num_zeros == -1 || num_ones == -1) {
    cout << "Impossible";
    return 0;
  }
  if (a == 0 && b == 0 && c == 0 && d == 0) {
    cout << 0;
    return 0;
  }
  if (num_ones * num_zeros == b + c)
    ;
  else if (fun_zeros * fun_ones == b + c) {
    num_ones = fun_ones;
    num_zeros = fun_zeros;
  } else if (num_ones * fun_zeros == b + c) {
    num_zeros = fun_zeros;
  } else if (num_zeros * fun_ones == b + c) {
    num_ones = fun_ones;
  } else {
    cout << "Impossible";
    return 0;
  }
  while (c > num_zeros && num_ones > 0) {
    cout << 1;
    c -= num_zeros;
    num_ones--;
  }
  for (i = 0; i < num_zeros - c; i++) cout << 0;
  if (num_ones) {
    cout << 1;
    num_ones--;
  }
  while (i < num_zeros) {
    cout << 0;
    i++;
  }
  while (num_ones--) cout << 1;
  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 fn(int x) {
  if (x == 0) return 0;
  int a = sqrt(2 * x);
  if (a * (a + 1) == 2 * x) return a + 1;
  return -1;
}
int gn(int x) {
  if (x == 0) return 1;
  int a = sqrt(2 * x);
  if (a * (a + 1) == 2 * x) return a + 1;
  return -1;
}
int main() {
  int a, b, c, d, num_zeros, num_ones, i, fun_zeros, fun_ones;
  cin >> a >> b >> c >> d;
  num_zeros = fn(a);
  num_ones = fn(d);
  fun_zeros = gn(a);
  fun_ones = gn(d);
  if (num_zeros == -1 || num_ones == -1) {
    cout << "Impossible";
    return 0;
  }
  if (a == 0 && b == 0 && c == 0 && d == 0) {
    cout << 0;
    return 0;
  }
  if (num_ones * num_zeros == b + c)
    ;
  else if (fun_zeros * fun_ones == b + c) {
    num_ones = fun_ones;
    num_zeros = fun_zeros;
  } else if (num_ones * fun_zeros == b + c) {
    num_zeros = fun_zeros;
  } else if (num_zeros * fun_ones == b + c) {
    num_ones = fun_ones;
  } else {
    cout << "Impossible";
    return 0;
  }
  while (c > num_zeros && num_ones > 0) {
    cout << 1;
    c -= num_zeros;
    num_ones--;
  }
  for (i = 0; i < num_zeros - c; i++) cout << 0;
  if (num_ones) {
    cout << 1;
    num_ones--;
  }
  while (i < num_zeros) {
    cout << 0;
    i++;
  }
  while (num_ones--) cout << 1;
  return 0;
}

```