#include <bits/stdc++.h>
using namespace std;
const int N = (int)1e5 + 123;
const long long INF = (long long)1e18 + 123;
const int inf = (int)1e9 + 123;
int a[5], cnt[3];
void no() {
  puts("Impossible");
  exit(0);
}
int main() {
  for (int i = 1; i <= 4; i++) cin >> a[i];
  cnt[0] = cnt[1] = -1;
  for (int i = 0; i <= 100000; i++) {
    long long tmp = 1ll * i * (i + 1);
    if ((tmp >> 1ll) == a[1]) cnt[0] = i;
    if ((tmp >> 1ll) == a[4]) cnt[1] = i;
  }
  if (cnt[0] == -1 || cnt[1] == -1) no();
  cnt[0]++, cnt[1]++;
  if (!a[1] && !a[4]) {
    if (a[2] + a[3] > 1) no();
    if (a[2] == 1)
      cout << "01";
    else if (a[3] == 1)
      cout << "10";
    else
      cout << "1";
    return 0;
  }
  if (!a[1]) {
    if (a[2] + a[3] > cnt[1]) no();
    if (a[2] + a[3] < cnt[1] && a[2] + a[3] > 0) no();
    for (int i = 1; i <= a[3]; i++) cout << 1;
    if (a[2] + a[3] > 0) cout << 0;
    for (int i = 1; i <= a[2]; i++) cout << 1;
    for (int i = 1; i <= cnt[1] - a[3] - a[2]; i++) cout << 1;
    return 0;
  }
  if (!a[4]) {
    if (a[2] + a[3] > cnt[0]) no();
    if (a[2] + a[3] < cnt[0] && a[2] + a[3] > 0) no();
    for (int i = 1; i <= a[2]; i++) cout << 0;
    if (a[2] + a[3] > 0) cout << 1;
    for (int i = 1; i <= a[3]; i++) cout << 0;
    for (int i = 1; i <= cnt[0] - a[3] - a[2]; i++) cout << 0;
    return 0;
  }
  if (cnt[0] * cnt[1] < a[2]) no();
  if (cnt[0] * cnt[1] < a[3]) no();
  if (cnt[0] * cnt[1] != a[2] + a[3]) no();
  for (int i = 1; i <= (a[3] / cnt[0]); i++) {
    cout << 1;
  }
  cnt[1] -= a[3] / cnt[0];
  int pos = cnt[0] + 1 - a[3] % cnt[0];
  for (int i = 1; i < pos; i++) {
    cout << 0;
  }
  if (a[3] % cnt[0] > 0) {
    cout << 1;
    cnt[1]--;
  }
  cnt[0] -= max(0, pos - 1);
  for (int i = 1; i <= cnt[0]; i++) cout << 0;
  for (int i = 1; i <= cnt[1]; i++) cout << 1;
  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 N = (int)1e5 + 123;
const long long INF = (long long)1e18 + 123;
const int inf = (int)1e9 + 123;
int a[5], cnt[3];
void no() {
  puts("Impossible");
  exit(0);
}
int main() {
  for (int i = 1; i <= 4; i++) cin >> a[i];
  cnt[0] = cnt[1] = -1;
  for (int i = 0; i <= 100000; i++) {
    long long tmp = 1ll * i * (i + 1);
    if ((tmp >> 1ll) == a[1]) cnt[0] = i;
    if ((tmp >> 1ll) == a[4]) cnt[1] = i;
  }
  if (cnt[0] == -1 || cnt[1] == -1) no();
  cnt[0]++, cnt[1]++;
  if (!a[1] && !a[4]) {
    if (a[2] + a[3] > 1) no();
    if (a[2] == 1)
      cout << "01";
    else if (a[3] == 1)
      cout << "10";
    else
      cout << "1";
    return 0;
  }
  if (!a[1]) {
    if (a[2] + a[3] > cnt[1]) no();
    if (a[2] + a[3] < cnt[1] && a[2] + a[3] > 0) no();
    for (int i = 1; i <= a[3]; i++) cout << 1;
    if (a[2] + a[3] > 0) cout << 0;
    for (int i = 1; i <= a[2]; i++) cout << 1;
    for (int i = 1; i <= cnt[1] - a[3] - a[2]; i++) cout << 1;
    return 0;
  }
  if (!a[4]) {
    if (a[2] + a[3] > cnt[0]) no();
    if (a[2] + a[3] < cnt[0] && a[2] + a[3] > 0) no();
    for (int i = 1; i <= a[2]; i++) cout << 0;
    if (a[2] + a[3] > 0) cout << 1;
    for (int i = 1; i <= a[3]; i++) cout << 0;
    for (int i = 1; i <= cnt[0] - a[3] - a[2]; i++) cout << 0;
    return 0;
  }
  if (cnt[0] * cnt[1] < a[2]) no();
  if (cnt[0] * cnt[1] < a[3]) no();
  if (cnt[0] * cnt[1] != a[2] + a[3]) no();
  for (int i = 1; i <= (a[3] / cnt[0]); i++) {
    cout << 1;
  }
  cnt[1] -= a[3] / cnt[0];
  int pos = cnt[0] + 1 - a[3] % cnt[0];
  for (int i = 1; i < pos; i++) {
    cout << 0;
  }
  if (a[3] % cnt[0] > 0) {
    cout << 1;
    cnt[1]--;
  }
  cnt[0] -= max(0, pos - 1);
  for (int i = 1; i <= cnt[0]; i++) cout << 0;
  for (int i = 1; i <= cnt[1]; i++) cout << 1;
  return 0;
}

```