#include <bits/stdc++.h>
using namespace std;
long long oo, oi, io, ii, sum;
char s[1000005];
int main() {
  cin >> oo >> oi >> io >> ii;
  if (oo + oi + io + ii == 0) return puts("1"), 0;
  sum = oo + oi + io + ii;
  sum *= 2;
  int t = sqrt(sum);
  if (t <= 3) t = 3;
  int len = -1;
  for (int i = t - 2; i <= t + 2; i++) {
    if ((long long)i * (i - 1) == sum) len = i;
  }
  int zero = -1, one = -1;
  t = sqrt(oo * 2);
  if (t <= 3) t = 3;
  for (int i = t - 2; i <= t + 2; i++) {
    if ((long long)i * (i - 1) == oo * 2) zero = i;
  }
  if (oi + io + oo == 0) zero = 0;
  one = len - zero;
  if (len == -1 || zero == -1 || (long long)(one) * (one - 1) != ii * 2)
    return puts("Impossible"), 0;
  int behind = 0, mid;
  if (zero == 0) {
    for (int i = 1; i <= len; i++) s[i] = '1';
    printf("%s", s + 1);
    return 0;
  }
  if (oi % zero == 0) {
    behind = oi / zero;
    if (behind > one) return puts("Impossible"), 0;
    for (int i = 1; i <= one - behind; i++) s[i] = '1';
    for (int i = one - behind + 1; i <= one - behind + zero; i++) s[i] = '0';
    for (int i = one - behind + zero + 1; i <= len; i++) s[i] = '1';
  } else {
    mid = oi % zero;
    behind = oi / zero;
    if (behind + 1 > one) return puts("Impossible"), 0;
    for (int i = 1; i <= one - behind - 1; i++) s[i] = '1';
    int cnt = 0;
    for (int i = one - behind; i <= one - behind + mid - 1; i++)
      s[i] = '0', cnt++;
    s[one - behind + mid] = '1';
    for (int i = one - behind + mid + 1; i <= one - behind + mid + zero - cnt;
         i++)
      s[i] = '0';
    for (int i = one - behind + mid + zero - cnt + 1; i <= len; i++) s[i] = '1';
  }
  printf("%s", s + 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;
long long oo, oi, io, ii, sum;
char s[1000005];
int main() {
  cin >> oo >> oi >> io >> ii;
  if (oo + oi + io + ii == 0) return puts("1"), 0;
  sum = oo + oi + io + ii;
  sum *= 2;
  int t = sqrt(sum);
  if (t <= 3) t = 3;
  int len = -1;
  for (int i = t - 2; i <= t + 2; i++) {
    if ((long long)i * (i - 1) == sum) len = i;
  }
  int zero = -1, one = -1;
  t = sqrt(oo * 2);
  if (t <= 3) t = 3;
  for (int i = t - 2; i <= t + 2; i++) {
    if ((long long)i * (i - 1) == oo * 2) zero = i;
  }
  if (oi + io + oo == 0) zero = 0;
  one = len - zero;
  if (len == -1 || zero == -1 || (long long)(one) * (one - 1) != ii * 2)
    return puts("Impossible"), 0;
  int behind = 0, mid;
  if (zero == 0) {
    for (int i = 1; i <= len; i++) s[i] = '1';
    printf("%s", s + 1);
    return 0;
  }
  if (oi % zero == 0) {
    behind = oi / zero;
    if (behind > one) return puts("Impossible"), 0;
    for (int i = 1; i <= one - behind; i++) s[i] = '1';
    for (int i = one - behind + 1; i <= one - behind + zero; i++) s[i] = '0';
    for (int i = one - behind + zero + 1; i <= len; i++) s[i] = '1';
  } else {
    mid = oi % zero;
    behind = oi / zero;
    if (behind + 1 > one) return puts("Impossible"), 0;
    for (int i = 1; i <= one - behind - 1; i++) s[i] = '1';
    int cnt = 0;
    for (int i = one - behind; i <= one - behind + mid - 1; i++)
      s[i] = '0', cnt++;
    s[one - behind + mid] = '1';
    for (int i = one - behind + mid + 1; i <= one - behind + mid + zero - cnt;
         i++)
      s[i] = '0';
    for (int i = one - behind + mid + zero - cnt + 1; i <= len; i++) s[i] = '1';
  }
  printf("%s", s + 1);
  return 0;
}

```