#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
const double pi = 4 * atan(1);
const int inf = 1 << 30;
const int INF = 0x3f3f3f3f;
const int MOD = 1e9 + 7;
int nCase = 0;
int dcmp(double x) {
  if (fabs(x) < eps) return 0;
  return x < 0 ? -1 : 1;
}
template <class T>
inline bool read(T &n) {
  T x = 0, tmp = 1;
  char c = getchar();
  while ((c < '0' || c > '9') && c != '-' && c != EOF) c = getchar();
  if (c == EOF) return false;
  if (c == '-') c = getchar(), tmp = -1;
  while (c >= '0' && c <= '9') x *= 10, x += (c - '0'), c = getchar();
  n = x * tmp;
  return true;
}
template <class T>
inline void write(T n) {
  if (n < 0) {
    putchar('-');
    n = -n;
  }
  int len = 0, data[20];
  while (n) {
    data[len++] = n % 10;
    n /= 10;
  }
  if (!len) data[len++] = 0;
  while (len--) putchar(data[len] + 48);
}
long long QMOD(long long x, long long k) {
  long long res = 1LL;
  while (k) {
    if (k & 1) res = res * x % MOD;
    k >>= 1;
    x = x * x % MOD;
  }
  return res;
}
long long calc(long long x) {
  long long n = sqrt(x * 2) - 2;
  if (n < 1) n = 1;
  while (n * (n - 1) / 2 < x) n++;
  if (n * (n - 1) / 2 == x)
    return n;
  else
    return -1;
}
int main(int argc, const char *argv[]) {
  long long a00, a01, a10, a11;
  cin >> a00 >> a01 >> a10 >> a11;
  long long sum = a00 + a01 + a10 + a11;
  if (sum == 0) {
    printf("0\n");
    return 0;
  }
  long long n = calc(sum);
  if (n == -1) {
    puts("Impossible");
    return 0;
  }
  if (a00 == 0 && a01 == 0 && a10 == 0) {
    for (int i = 0; i < n; ++i) putchar('1');
    puts("");
    return 0;
  }
  if (a11 == 0 && a01 == 0 && a10 == 0) {
    for (int i = 0; i < n; ++i) putchar('0');
    puts("");
    return 0;
  }
  int zero = calc(a00);
  int one = calc(a11);
  if (zero == -1 || one == -1 || one + zero != n) {
    puts("Impossible");
    return 0;
  }
  for (int i = 0; i < n; ++i) {
    if (zero > 0 && a01 >= one) {
      a01 -= one;
      zero--;
      putchar('0');
    } else if (one > 0 && a10 >= zero) {
      a10 -= zero;
      one--;
      putchar('1');
    }
  }
  puts("");
  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>
using namespace std;
const double eps = 1e-8;
const double pi = 4 * atan(1);
const int inf = 1 << 30;
const int INF = 0x3f3f3f3f;
const int MOD = 1e9 + 7;
int nCase = 0;
int dcmp(double x) {
  if (fabs(x) < eps) return 0;
  return x < 0 ? -1 : 1;
}
template <class T>
inline bool read(T &n) {
  T x = 0, tmp = 1;
  char c = getchar();
  while ((c < '0' || c > '9') && c != '-' && c != EOF) c = getchar();
  if (c == EOF) return false;
  if (c == '-') c = getchar(), tmp = -1;
  while (c >= '0' && c <= '9') x *= 10, x += (c - '0'), c = getchar();
  n = x * tmp;
  return true;
}
template <class T>
inline void write(T n) {
  if (n < 0) {
    putchar('-');
    n = -n;
  }
  int len = 0, data[20];
  while (n) {
    data[len++] = n % 10;
    n /= 10;
  }
  if (!len) data[len++] = 0;
  while (len--) putchar(data[len] + 48);
}
long long QMOD(long long x, long long k) {
  long long res = 1LL;
  while (k) {
    if (k & 1) res = res * x % MOD;
    k >>= 1;
    x = x * x % MOD;
  }
  return res;
}
long long calc(long long x) {
  long long n = sqrt(x * 2) - 2;
  if (n < 1) n = 1;
  while (n * (n - 1) / 2 < x) n++;
  if (n * (n - 1) / 2 == x)
    return n;
  else
    return -1;
}
int main(int argc, const char *argv[]) {
  long long a00, a01, a10, a11;
  cin >> a00 >> a01 >> a10 >> a11;
  long long sum = a00 + a01 + a10 + a11;
  if (sum == 0) {
    printf("0\n");
    return 0;
  }
  long long n = calc(sum);
  if (n == -1) {
    puts("Impossible");
    return 0;
  }
  if (a00 == 0 && a01 == 0 && a10 == 0) {
    for (int i = 0; i < n; ++i) putchar('1');
    puts("");
    return 0;
  }
  if (a11 == 0 && a01 == 0 && a10 == 0) {
    for (int i = 0; i < n; ++i) putchar('0');
    puts("");
    return 0;
  }
  int zero = calc(a00);
  int one = calc(a11);
  if (zero == -1 || one == -1 || one + zero != n) {
    puts("Impossible");
    return 0;
  }
  for (int i = 0; i < n; ++i) {
    if (zero > 0 && a01 >= one) {
      a01 -= one;
      zero--;
      putchar('0');
    } else if (one > 0 && a10 >= zero) {
      a10 -= zero;
      one--;
      putchar('1');
    }
  }
  puts("");
  return 0;
}

```