#include <bits/stdc++.h>
using namespace std;
string s;
int cum[2][1000009];
void insert(string c, int idx) {
  string tmp = s.substr(0, idx);
  tmp += c;
  tmp += s.substr(idx);
  s = tmp;
}
int main() {
  long long a, b, c, d;
  scanf("%lld%lld%lld%lld", &a, &b, &c, &d);
  if (a + b + c + d == 0) return 0 * puts("1");
  long long tmpa = a, tmpb = b, tmpc = c, tmpd = d;
  long long one = -1, zero = -1;
  if ((!a || !d) && (c || b)) zero = one = 1;
  for (long long i = 2; i <= 10000000; ++i) {
    if (i * (i - 1) / 2 == a) zero = i;
    if (i * (i - 1) / 2 == d) one = i;
  }
  if (one > 0 && !a && !b && !c)
    return 0 * printf("%s\n", string(one, '1').c_str());
  if (zero > 0 && !b && !c && !d)
    return 0 * printf("%s\n", string(zero, '0').c_str());
  if (one == -1 || zero == -1) return 0 * puts("Impossible");
  if (c > one * zero || b > one * zero) return 0 * puts("Impossible");
  int flag = 0;
  if (zero > one) {
    swap(a, d);
    swap(b, c);
    swap(zero, one);
    flag = 1;
  }
  s = string(one, '1');
  int modB = b % one;
  int modC = c % one;
  if ((modB + modC) % one) return 0 * puts("Impossible");
  if (b) {
    insert("0", modC);
    b -= one - modC;
    c -= modC;
    --zero;
  }
  if (zero) insert(string(b / one, '0'), 0);
  if (zero) insert(string(zero - b / one, '0'), s.size());
  if (flag)
    for (int i = 0; i < s.size(); ++i)
      if (s[i] == '1')
        s[i] = '0';
      else
        s[i] = '1';
  cum[0][s.size() - 1] = s[s.size() - 1] == '0';
  cum[1][s.size() - 1] = s[s.size() - 1] == '1';
  for (int i = int(s.size()) - 2; i >= 0; --i) {
    cum[0][i] = cum[0][i + 1] + (s[i] == '0');
    cum[1][i] = cum[1][i + 1] + (s[i] == '1');
  }
  one = zero = 0;
  int onezero = 0, zeroone = 0;
  for (int i = 0; i < s.size(); ++i) {
    one += s[i] == '1';
    zero += s[i] == '0';
    if (s[i] == '1')
      onezero += cum[0][i];
    else
      zeroone += cum[1][i];
  }
  one = one * (one - 1) / 2;
  zero = zero * (zero - 1) / 2;
  if (zero != tmpa || zeroone != tmpb || onezero != tmpc || one != tmpd)
    puts("Impossible");
  else
    printf("%s", s.c_str());
  return 0;
}

### Prompt

Create a solution in Cpp for 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;
string s;
int cum[2][1000009];
void insert(string c, int idx) {
  string tmp = s.substr(0, idx);
  tmp += c;
  tmp += s.substr(idx);
  s = tmp;
}
int main() {
  long long a, b, c, d;
  scanf("%lld%lld%lld%lld", &a, &b, &c, &d);
  if (a + b + c + d == 0) return 0 * puts("1");
  long long tmpa = a, tmpb = b, tmpc = c, tmpd = d;
  long long one = -1, zero = -1;
  if ((!a || !d) && (c || b)) zero = one = 1;
  for (long long i = 2; i <= 10000000; ++i) {
    if (i * (i - 1) / 2 == a) zero = i;
    if (i * (i - 1) / 2 == d) one = i;
  }
  if (one > 0 && !a && !b && !c)
    return 0 * printf("%s\n", string(one, '1').c_str());
  if (zero > 0 && !b && !c && !d)
    return 0 * printf("%s\n", string(zero, '0').c_str());
  if (one == -1 || zero == -1) return 0 * puts("Impossible");
  if (c > one * zero || b > one * zero) return 0 * puts("Impossible");
  int flag = 0;
  if (zero > one) {
    swap(a, d);
    swap(b, c);
    swap(zero, one);
    flag = 1;
  }
  s = string(one, '1');
  int modB = b % one;
  int modC = c % one;
  if ((modB + modC) % one) return 0 * puts("Impossible");
  if (b) {
    insert("0", modC);
    b -= one - modC;
    c -= modC;
    --zero;
  }
  if (zero) insert(string(b / one, '0'), 0);
  if (zero) insert(string(zero - b / one, '0'), s.size());
  if (flag)
    for (int i = 0; i < s.size(); ++i)
      if (s[i] == '1')
        s[i] = '0';
      else
        s[i] = '1';
  cum[0][s.size() - 1] = s[s.size() - 1] == '0';
  cum[1][s.size() - 1] = s[s.size() - 1] == '1';
  for (int i = int(s.size()) - 2; i >= 0; --i) {
    cum[0][i] = cum[0][i + 1] + (s[i] == '0');
    cum[1][i] = cum[1][i + 1] + (s[i] == '1');
  }
  one = zero = 0;
  int onezero = 0, zeroone = 0;
  for (int i = 0; i < s.size(); ++i) {
    one += s[i] == '1';
    zero += s[i] == '0';
    if (s[i] == '1')
      onezero += cum[0][i];
    else
      zeroone += cum[1][i];
  }
  one = one * (one - 1) / 2;
  zero = zero * (zero - 1) / 2;
  if (zero != tmpa || zeroone != tmpb || onezero != tmpc || one != tmpd)
    puts("Impossible");
  else
    printf("%s", s.c_str());
  return 0;
}

```