#include <bits/stdc++.h>
using namespace std;
long long a, b, c, d;
map<long long, long long> vis;
void init() {
  long long now = 1;
  for (int i = 2; i <= 1000000; i++) {
    vis[now] = i;
    now += i;
    if (now > 1000000000) break;
  }
}
char s[1000005];
int main() {
  cin >> a >> b >> c >> d;
  init();
  if ((a && !vis[a]) || (d && !vis[d])) {
    printf("Impossible\n");
    return 0;
  }
  long long n0 = vis[a];
  long long n1 = vis[d];
  long long tot = n0 * n1;
  if (!n1 && !n0) {
    if (!b && !c)
      cout << '1' << endl;
    else if (b == 1 && c == 0)
      cout << "01" << endl;
    else if (b == 0 && c == 1)
      cout << "10" << endl;
    else
      cout << "Impossible" << endl;
    return 0;
  }
  if (n1 + n0 > 1000000) {
    printf("Impossible\n");
    return 0;
  }
  if (b == tot - c) {
    if (!n1) {
      for (int i = 0; i < n0; i++) cout << '0';
      cout << endl;
      return 0;
    }
    int e = b / n1, f = b % n1;
    for (int i = 0; i < e; i++) cout << '0';
    for (int i = 0; i < n1 - f; i++) cout << '1';
    if (e - f < n0) cout << '0';
    for (int i = 0; i < f; i++) cout << '1';
    for (int i = 0; i < n0 - 1 - e; i++) cout << '0';
    cout << endl;
  } else {
    if (!n1) n1 = 1;
    if (!n0) n0 = 1;
    tot = n0 * n1;
    if (b == tot - c) {
      int e = b / n1, f = b % n1;
      for (int i = 0; i < e; i++) cout << '0';
      for (int i = 0; i < n1 - f; i++) cout << '1';
      if (e - f < n0) cout << '0';
      for (int i = 0; i < f; i++) cout << '1';
      for (int i = 0; i < n0 - 1 - e; i++) cout << '0';
      cout << endl;
    } else {
      cout << "Impossible" << endl;
    }
  }
  return 0;
}

### Prompt

Develop a solution in CPP 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;
long long a, b, c, d;
map<long long, long long> vis;
void init() {
  long long now = 1;
  for (int i = 2; i <= 1000000; i++) {
    vis[now] = i;
    now += i;
    if (now > 1000000000) break;
  }
}
char s[1000005];
int main() {
  cin >> a >> b >> c >> d;
  init();
  if ((a && !vis[a]) || (d && !vis[d])) {
    printf("Impossible\n");
    return 0;
  }
  long long n0 = vis[a];
  long long n1 = vis[d];
  long long tot = n0 * n1;
  if (!n1 && !n0) {
    if (!b && !c)
      cout << '1' << endl;
    else if (b == 1 && c == 0)
      cout << "01" << endl;
    else if (b == 0 && c == 1)
      cout << "10" << endl;
    else
      cout << "Impossible" << endl;
    return 0;
  }
  if (n1 + n0 > 1000000) {
    printf("Impossible\n");
    return 0;
  }
  if (b == tot - c) {
    if (!n1) {
      for (int i = 0; i < n0; i++) cout << '0';
      cout << endl;
      return 0;
    }
    int e = b / n1, f = b % n1;
    for (int i = 0; i < e; i++) cout << '0';
    for (int i = 0; i < n1 - f; i++) cout << '1';
    if (e - f < n0) cout << '0';
    for (int i = 0; i < f; i++) cout << '1';
    for (int i = 0; i < n0 - 1 - e; i++) cout << '0';
    cout << endl;
  } else {
    if (!n1) n1 = 1;
    if (!n0) n0 = 1;
    tot = n0 * n1;
    if (b == tot - c) {
      int e = b / n1, f = b % n1;
      for (int i = 0; i < e; i++) cout << '0';
      for (int i = 0; i < n1 - f; i++) cout << '1';
      if (e - f < n0) cout << '0';
      for (int i = 0; i < f; i++) cout << '1';
      for (int i = 0; i < n0 - 1 - e; i++) cout << '0';
      cout << endl;
    } else {
      cout << "Impossible" << endl;
    }
  }
  return 0;
}

```