#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,tune=native")
#pragma GCC optimize("unroll-loops")
using namespace std;
void Draganov47(string click) {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
void submit() {
  long long a00, a01, a10, a11;
  cin >> a00 >> a01 >> a10 >> a11;
  long long cnt0 = -1, cnt1 = -1;
  const long long MAX = 1e6;
  for (long long d = 1; d <= MAX; d++) {
    if ((d * (d - 1) / 2) == a00) {
      cnt0 = d;
      break;
    }
  }
  for (long long d = 1; d <= MAX; d++) {
    if (((d * (d - 1)) / 2) == a11) {
      cnt1 = d;
      break;
    }
  }
  long long sum = a01 + a10;
  if (cnt0 == -1 || cnt1 == -1 || (cnt0 * cnt1) != sum && sum != 0) {
    cout << "Impossible";
    exit(0);
  }
  if (sum == 0) {
    if (a00 == 0 || a11 == 0) {
      if (a00 == 0) {
        cnt0 = 0;
      } else {
        cnt1 = 0;
      }
    } else {
      cout << "Impossible";
      exit(0);
    }
  }
  long long cur0 = 0;
  long long n = cnt0 + cnt1;
  while (a10 >= cnt0 && cnt0 != 0) {
    cout << 1;
    a10 -= cnt0;
    cnt1--;
  }
  while (cur0 != cnt0) {
    cur0++;
    cout << 0;
    if (cnt0 - cur0 == a10 && cnt1) {
      cout << 1;
      a10 = -1;
      cnt1--;
    }
  }
  while (cnt1) {
    cnt1--;
    cout << 1;
  }
}
int main() {
  Draganov47("vk.com/gotovseros");
  int T = 1;
  for (int c = 1; c <= T; c++) {
    submit();
  }
  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>
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,tune=native")
#pragma GCC optimize("unroll-loops")
using namespace std;
void Draganov47(string click) {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
void submit() {
  long long a00, a01, a10, a11;
  cin >> a00 >> a01 >> a10 >> a11;
  long long cnt0 = -1, cnt1 = -1;
  const long long MAX = 1e6;
  for (long long d = 1; d <= MAX; d++) {
    if ((d * (d - 1) / 2) == a00) {
      cnt0 = d;
      break;
    }
  }
  for (long long d = 1; d <= MAX; d++) {
    if (((d * (d - 1)) / 2) == a11) {
      cnt1 = d;
      break;
    }
  }
  long long sum = a01 + a10;
  if (cnt0 == -1 || cnt1 == -1 || (cnt0 * cnt1) != sum && sum != 0) {
    cout << "Impossible";
    exit(0);
  }
  if (sum == 0) {
    if (a00 == 0 || a11 == 0) {
      if (a00 == 0) {
        cnt0 = 0;
      } else {
        cnt1 = 0;
      }
    } else {
      cout << "Impossible";
      exit(0);
    }
  }
  long long cur0 = 0;
  long long n = cnt0 + cnt1;
  while (a10 >= cnt0 && cnt0 != 0) {
    cout << 1;
    a10 -= cnt0;
    cnt1--;
  }
  while (cur0 != cnt0) {
    cur0++;
    cout << 0;
    if (cnt0 - cur0 == a10 && cnt1) {
      cout << 1;
      a10 = -1;
      cnt1--;
    }
  }
  while (cnt1) {
    cnt1--;
    cout << 1;
  }
}
int main() {
  Draganov47("vk.com/gotovseros");
  int T = 1;
  for (int c = 1; c <= T; c++) {
    submit();
  }
  return 0;
}

```