#include <bits/stdc++.h>
using namespace std;
const int N = 2 * 1e3 + 5;
int a[4], b[4];
int root(long long x) {
  long long l = 0, r = 1e9, m;
  while (r >= l) {
    m = (l + r) / 2;
    if (m * (m - 1) - 2 * x == 0) break;
    if (m * (m - 1) - 2 * x < 0)
      l = m + 1;
    else
      r = m - 1;
  }
  return m;
}
void print(int b0, int b1, int a1, int a2) {
  int end = (b1) ? (a2 / b1) : a2, mid = (b1) ? (a2 % b1) : 0;
  for (int i = 0; i < (int)b0 - end - (mid > 0); ++i) cout << '0';
  for (int i = 0; i < mid; ++i) cout << '1';
  if (mid > 0) cout << '0';
  for (int i = 0; i < (int)b1 - mid; ++i) cout << '1';
  for (int i = 0; i < end; ++i) cout << '0';
}
bool check(int b0, int b1, int a1, int a2) {
  if ((b0 == 0 || b1 == 0) && a2 != 0 && a1 != 0) return 0;
  return 1LL * b0 * b1 == a1 + a2;
}
int main() {
  for (int i = 0; i < 4; ++i) scanf("%d", a + i);
  b[0] = root(a[0]);
  if (b[0] * (b[0] - 1) / 2 != a[0]) return cout << "Impossible\n", 0;
  b[1] = root(a[3]);
  if (b[1] * (b[1] - 1) / 2 != a[3]) return cout << "Impossible\n", 0;
  if (a[0] == 0 && a[3] == 0) {
    if (a[1] == 0 && a[2] == 0) return cout << "0", 0;
    if (a[1] == 1 && a[2] == 0) return cout << "01", 0;
    if (a[1] == 0 && a[2] == 1) return cout << "10", 0;
    return cout << "Impossible\n", 0;
  }
  if (a[0] == 0) {
    for (int i = 0; i < 2; i++)
      if (check(i, b[1], a[1], a[2])) {
        print(i, b[1], a[1], a[2]);
        return 0;
      }
    return cout << "Impossible\n", 0;
  }
  if (a[3] == 0) {
    for (int i = 0; i < 2; i++)
      if (check(b[0], i, a[1], a[2])) {
        print(b[0], i, a[1], a[2]);
        return 0;
      }
    return cout << "Impossible\n", 0;
  }
  if (check(b[0], b[1], a[1], a[2]) == 0) return cout << "Impossible\n", 0;
  print(b[0], b[1], a[1], a[2]);
}

### 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 = 2 * 1e3 + 5;
int a[4], b[4];
int root(long long x) {
  long long l = 0, r = 1e9, m;
  while (r >= l) {
    m = (l + r) / 2;
    if (m * (m - 1) - 2 * x == 0) break;
    if (m * (m - 1) - 2 * x < 0)
      l = m + 1;
    else
      r = m - 1;
  }
  return m;
}
void print(int b0, int b1, int a1, int a2) {
  int end = (b1) ? (a2 / b1) : a2, mid = (b1) ? (a2 % b1) : 0;
  for (int i = 0; i < (int)b0 - end - (mid > 0); ++i) cout << '0';
  for (int i = 0; i < mid; ++i) cout << '1';
  if (mid > 0) cout << '0';
  for (int i = 0; i < (int)b1 - mid; ++i) cout << '1';
  for (int i = 0; i < end; ++i) cout << '0';
}
bool check(int b0, int b1, int a1, int a2) {
  if ((b0 == 0 || b1 == 0) && a2 != 0 && a1 != 0) return 0;
  return 1LL * b0 * b1 == a1 + a2;
}
int main() {
  for (int i = 0; i < 4; ++i) scanf("%d", a + i);
  b[0] = root(a[0]);
  if (b[0] * (b[0] - 1) / 2 != a[0]) return cout << "Impossible\n", 0;
  b[1] = root(a[3]);
  if (b[1] * (b[1] - 1) / 2 != a[3]) return cout << "Impossible\n", 0;
  if (a[0] == 0 && a[3] == 0) {
    if (a[1] == 0 && a[2] == 0) return cout << "0", 0;
    if (a[1] == 1 && a[2] == 0) return cout << "01", 0;
    if (a[1] == 0 && a[2] == 1) return cout << "10", 0;
    return cout << "Impossible\n", 0;
  }
  if (a[0] == 0) {
    for (int i = 0; i < 2; i++)
      if (check(i, b[1], a[1], a[2])) {
        print(i, b[1], a[1], a[2]);
        return 0;
      }
    return cout << "Impossible\n", 0;
  }
  if (a[3] == 0) {
    for (int i = 0; i < 2; i++)
      if (check(b[0], i, a[1], a[2])) {
        print(b[0], i, a[1], a[2]);
        return 0;
      }
    return cout << "Impossible\n", 0;
  }
  if (check(b[0], b[1], a[1], a[2]) == 0) return cout << "Impossible\n", 0;
  print(b[0], b[1], a[1], a[2]);
}

```