#include <bits/stdc++.h>
using namespace std;
string s = "";
long long a, b, c, d;
bool ok(long long e0, long long e1) {
  if (b + c != e0 * e1) return false;
  long long e, t;
  if (e1)
    e = b / e1;
  else
    e = 0;
  if (e1)
    t = b % e1;
  else
    t = 0;
  for (int i = 0; i < e; i++) s += "0";
  for (int i = 0; i < e1 - t; i++) s += "1";
  if (e < e0) s += "0";
  for (int i = e1 - t; i < e1; i++) s += "1";
  for (int i = e + 1; i < e0; i++) s += "0";
  return true;
}
int main() {
  long long e, e0, e1, t;
  cin >> a >> b >> c >> d;
  for (e = 0, t = 0; t < a; e++) t = (1ll * e * (e + 1)) >> 1;
  if (t != a) {
    cout << "Impossible" << endl;
    return 0;
  }
  e0 = e;
  for (e = 0, t = 0; t < d; e++) t = (1ll * e * (e + 1)) >> 1;
  if (t != d) {
    cout << "Impossible" << endl;
    return 0;
  }
  e1 = e;
  bool g = ok(e0, e1);
  if (!g && !a) g = ok(1, e1);
  if (!g && !d) g = ok(e0, 1);
  if (!g && !a && !d) g = ok(1, 1);
  if (s == "") s = "0";
  if (g)
    cout << s << endl;
  else
    cout << "Impossible" << endl;
  return 0;
}

### Prompt

Please create a solution in CPP 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;
string s = "";
long long a, b, c, d;
bool ok(long long e0, long long e1) {
  if (b + c != e0 * e1) return false;
  long long e, t;
  if (e1)
    e = b / e1;
  else
    e = 0;
  if (e1)
    t = b % e1;
  else
    t = 0;
  for (int i = 0; i < e; i++) s += "0";
  for (int i = 0; i < e1 - t; i++) s += "1";
  if (e < e0) s += "0";
  for (int i = e1 - t; i < e1; i++) s += "1";
  for (int i = e + 1; i < e0; i++) s += "0";
  return true;
}
int main() {
  long long e, e0, e1, t;
  cin >> a >> b >> c >> d;
  for (e = 0, t = 0; t < a; e++) t = (1ll * e * (e + 1)) >> 1;
  if (t != a) {
    cout << "Impossible" << endl;
    return 0;
  }
  e0 = e;
  for (e = 0, t = 0; t < d; e++) t = (1ll * e * (e + 1)) >> 1;
  if (t != d) {
    cout << "Impossible" << endl;
    return 0;
  }
  e1 = e;
  bool g = ok(e0, e1);
  if (!g && !a) g = ok(1, e1);
  if (!g && !d) g = ok(e0, 1);
  if (!g && !a && !d) g = ok(1, 1);
  if (s == "") s = "0";
  if (g)
    cout << s << endl;
  else
    cout << "Impossible" << endl;
  return 0;
}

```