#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
struct debugger {
  template <typename T>
  debugger& operator,(const T& v) {
    cerr << v << " ";
    return *this;
  }
} dbg;
set<int> sumTerm;
int l[1000005], a00, a01, a10, a11;
bool Solve(int m, int n) {
  int a = a10, i, p, ll, rr;
  if (a01 + a10 != m * n) return false;
  if (n == 0 && m == 0) return false;
  ll = rr = 0;
  for (i = m - 1; i >= 0; i--) {
    l[i] = min(a, n);
    a -= l[i];
    ll += l[i];
    rr += n - l[i];
  }
  assert(a == 0);
  assert(ll == a10 && rr == a01);
  p = 0;
  for (i = 0; i < m; i++) {
    while (p < l[i]) {
      printf("1");
      p++;
    }
    a10 -= p;
    a01 -= n - p;
    printf("0");
  }
  while (p < n) {
    printf("1");
    p++;
  }
  assert(a01 == 0 && a10 == 0);
  return true;
}
int main() {
  int i, x, j, m, n;
  vector<int> mm, nn;
  i = 0;
  while (true) {
    x = (i * (i + 1)) / 2;
    if (x > 1000000007) break;
    sumTerm.insert(x);
    i++;
  }
  scanf("%d %d %d %d", &a00, &a01, &a10, &a11);
  if (sumTerm.find(a00) == sumTerm.end() ||
      sumTerm.find(a11) == sumTerm.end()) {
    printf("Impossible\n");
    return 0;
  }
  m = 0;
  while ((m * (m + 1)) / 2 != a00) m++;
  n = 0;
  while ((n * (n + 1)) / 2 != a11) n++;
  if (m == 0) {
    mm.push_back(0);
    mm.push_back(1);
  } else {
    mm.push_back(m + 1);
  }
  if (n == 0) {
    nn.push_back(0);
    nn.push_back(1);
  } else {
    nn.push_back(n + 1);
  }
  for (i = 0; i < mm.size(); i++)
    for (j = 0; j < nn.size(); j++)
      if (Solve(mm[i], nn[j])) return 0;
  printf("Impossible\n");
  return 0;
}

### Prompt

Please formulate a cpp solution to the following problem:

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 double PI = acos(-1.0);
struct debugger {
  template <typename T>
  debugger& operator,(const T& v) {
    cerr << v << " ";
    return *this;
  }
} dbg;
set<int> sumTerm;
int l[1000005], a00, a01, a10, a11;
bool Solve(int m, int n) {
  int a = a10, i, p, ll, rr;
  if (a01 + a10 != m * n) return false;
  if (n == 0 && m == 0) return false;
  ll = rr = 0;
  for (i = m - 1; i >= 0; i--) {
    l[i] = min(a, n);
    a -= l[i];
    ll += l[i];
    rr += n - l[i];
  }
  assert(a == 0);
  assert(ll == a10 && rr == a01);
  p = 0;
  for (i = 0; i < m; i++) {
    while (p < l[i]) {
      printf("1");
      p++;
    }
    a10 -= p;
    a01 -= n - p;
    printf("0");
  }
  while (p < n) {
    printf("1");
    p++;
  }
  assert(a01 == 0 && a10 == 0);
  return true;
}
int main() {
  int i, x, j, m, n;
  vector<int> mm, nn;
  i = 0;
  while (true) {
    x = (i * (i + 1)) / 2;
    if (x > 1000000007) break;
    sumTerm.insert(x);
    i++;
  }
  scanf("%d %d %d %d", &a00, &a01, &a10, &a11);
  if (sumTerm.find(a00) == sumTerm.end() ||
      sumTerm.find(a11) == sumTerm.end()) {
    printf("Impossible\n");
    return 0;
  }
  m = 0;
  while ((m * (m + 1)) / 2 != a00) m++;
  n = 0;
  while ((n * (n + 1)) / 2 != a11) n++;
  if (m == 0) {
    mm.push_back(0);
    mm.push_back(1);
  } else {
    mm.push_back(m + 1);
  }
  if (n == 0) {
    nn.push_back(0);
    nn.push_back(1);
  } else {
    nn.push_back(n + 1);
  }
  for (i = 0; i < mm.size(); i++)
    for (j = 0; j < nn.size(); j++)
      if (Solve(mm[i], nn[j])) return 0;
  printf("Impossible\n");
  return 0;
}

```