#include <bits/stdc++.h>
const double PI = acos(-1.0);
using namespace std;
int gcd(const int& a, const int& b) { return a == 0 ? b : gcd(b % a, a); }
double qrt(double x) { return x * x; }
struct Node {
  int value;
  Node *l, *r;
};
struct Tree {
  Node* root = NULL;
  void add(const int& x) { root = add(x, root); }
  Node* add(const int& x, Node* cur) {
    if (cur == NULL) {
      cur = new Node();
      cur->value = x;
      return cur;
    }
    if (cur->value < x) {
      cur->r = add(x, cur->r);
    } else {
      cur->l = add(x, cur->l);
    }
    return cur;
  }
  void f() { f(root); }
  void f(Node* cur) {
    if (cur == NULL) return;
    if (cur->l == cur->r & cur->r == NULL) {
      cout << cur->value << endl;
      return;
    }
    f(cur->r);
    f(cur->l);
    cout << cur->value << endl;
  }
};
long long gcd(const long long& a, const long long& b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long nok(const long long& a, const long long& b) {
  return a / gcd(a, b) * b;
}
vector<int> p = {5, 7, 11, 13, 17};
long long bpm(const long long& a, const long long& n, const long long& m) {
  if (n == 0) return 1;
  if (n % 2 == 0) {
    long long b = bpm(a, n >> 1, m);
    return (b * b) % m;
  }
  return (a * bpm(a, n - 1, m)) % m;
}
bool witnes(const long long& a, const long long& p) {
  long long n = p - 1;
  long long t = 0;
  while (n % 2 == 0) {
    ++t;
    n /= 2;
  }
  long long x = bpm(a, n, p), y;
  for (int i = 0; i < t; ++i) {
    y = bpm(x, 2, p);
    if (y == 1 && x != 1 && x != p - 1) return true;
    x = y;
  }
  if (x != 1 && x != 0) return true;
  return false;
}
bool miller_rabbin(const long long& n) {
  if (n == 1) return false;
  if (n == 2) return true;
  if (n % 2 == 0) return false;
  for (int i = 0; i < p.size(); ++i) {
    if (witnes(p[i], n)) return false;
  }
  return true;
}
int main() {
  long long a00, a10, a01, a11;
  cin >> a00 >> a01 >> a10 >> a11;
  if (a00 == 0 && a10 == 0 && a11 == 0 && a01 == 0) {
    cout << 0 << endl;
    return 0;
  }
  long long l = 0, r = 1000000000;
  long long ff = a00 << 1;
  while (1) {
    long long mid = l + ((r - l) >> 1);
    if (mid * (mid + 1) > ff) {
      r = mid;
    } else {
      if ((mid + 1) * (mid + 2) > ff) {
        ff = mid;
        break;
      }
      l = mid + 1;
    }
  }
  if (ff * (ff + 1) != a00 << 1) {
    cout << "Impossible" << endl;
    return 0;
  }
  long long aa00 = ff;
  l = 0, r = 1000000000;
  ff = a11 << 1;
  while (1) {
    long long mid = l + ((r - l) >> 1);
    if (mid * (mid + 1) > ff) {
      r = mid;
    } else {
      if ((mid + 1) * (mid + 2) > ff) {
        ff = mid;
        break;
      }
      l = mid + 1;
    }
  }
  if (ff * (ff + 1) != a11 << 1) {
    cout << "Impossible" << endl;
    return 0;
  }
  long long aa11 = ff;
  ++aa11;
  ++aa00;
  if (a01 + a10 == 0 && aa11 == 1) --aa11;
  if (a01 + a10 == 0 && aa00 == 1) --aa00;
  if (a01 + a10 != aa00 * aa11) {
    cout << "Impossible" << endl;
    return 0;
  }
  long long ka10 = a10 / (aa00 == 0 ? 1 : aa00),
            ma10 = aa00 - a10 % (aa00 == 0 ? 1 : aa00);
  for (long long i = 0; i < ka10; ++i) {
    cout << 1;
    --aa11;
  }
  for (long long i = 0; i < ma10; ++i) {
    cout << 0;
    --aa00;
  }
  if (aa11) {
    cout << 1;
    --aa11;
  }
  for (long long i = 0; i < aa00; ++i) {
    cout << 0;
  }
  for (long long i = 0; i < aa11; ++i) {
    cout << 1;
  }
  cout << endl;
  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>
const double PI = acos(-1.0);
using namespace std;
int gcd(const int& a, const int& b) { return a == 0 ? b : gcd(b % a, a); }
double qrt(double x) { return x * x; }
struct Node {
  int value;
  Node *l, *r;
};
struct Tree {
  Node* root = NULL;
  void add(const int& x) { root = add(x, root); }
  Node* add(const int& x, Node* cur) {
    if (cur == NULL) {
      cur = new Node();
      cur->value = x;
      return cur;
    }
    if (cur->value < x) {
      cur->r = add(x, cur->r);
    } else {
      cur->l = add(x, cur->l);
    }
    return cur;
  }
  void f() { f(root); }
  void f(Node* cur) {
    if (cur == NULL) return;
    if (cur->l == cur->r & cur->r == NULL) {
      cout << cur->value << endl;
      return;
    }
    f(cur->r);
    f(cur->l);
    cout << cur->value << endl;
  }
};
long long gcd(const long long& a, const long long& b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long nok(const long long& a, const long long& b) {
  return a / gcd(a, b) * b;
}
vector<int> p = {5, 7, 11, 13, 17};
long long bpm(const long long& a, const long long& n, const long long& m) {
  if (n == 0) return 1;
  if (n % 2 == 0) {
    long long b = bpm(a, n >> 1, m);
    return (b * b) % m;
  }
  return (a * bpm(a, n - 1, m)) % m;
}
bool witnes(const long long& a, const long long& p) {
  long long n = p - 1;
  long long t = 0;
  while (n % 2 == 0) {
    ++t;
    n /= 2;
  }
  long long x = bpm(a, n, p), y;
  for (int i = 0; i < t; ++i) {
    y = bpm(x, 2, p);
    if (y == 1 && x != 1 && x != p - 1) return true;
    x = y;
  }
  if (x != 1 && x != 0) return true;
  return false;
}
bool miller_rabbin(const long long& n) {
  if (n == 1) return false;
  if (n == 2) return true;
  if (n % 2 == 0) return false;
  for (int i = 0; i < p.size(); ++i) {
    if (witnes(p[i], n)) return false;
  }
  return true;
}
int main() {
  long long a00, a10, a01, a11;
  cin >> a00 >> a01 >> a10 >> a11;
  if (a00 == 0 && a10 == 0 && a11 == 0 && a01 == 0) {
    cout << 0 << endl;
    return 0;
  }
  long long l = 0, r = 1000000000;
  long long ff = a00 << 1;
  while (1) {
    long long mid = l + ((r - l) >> 1);
    if (mid * (mid + 1) > ff) {
      r = mid;
    } else {
      if ((mid + 1) * (mid + 2) > ff) {
        ff = mid;
        break;
      }
      l = mid + 1;
    }
  }
  if (ff * (ff + 1) != a00 << 1) {
    cout << "Impossible" << endl;
    return 0;
  }
  long long aa00 = ff;
  l = 0, r = 1000000000;
  ff = a11 << 1;
  while (1) {
    long long mid = l + ((r - l) >> 1);
    if (mid * (mid + 1) > ff) {
      r = mid;
    } else {
      if ((mid + 1) * (mid + 2) > ff) {
        ff = mid;
        break;
      }
      l = mid + 1;
    }
  }
  if (ff * (ff + 1) != a11 << 1) {
    cout << "Impossible" << endl;
    return 0;
  }
  long long aa11 = ff;
  ++aa11;
  ++aa00;
  if (a01 + a10 == 0 && aa11 == 1) --aa11;
  if (a01 + a10 == 0 && aa00 == 1) --aa00;
  if (a01 + a10 != aa00 * aa11) {
    cout << "Impossible" << endl;
    return 0;
  }
  long long ka10 = a10 / (aa00 == 0 ? 1 : aa00),
            ma10 = aa00 - a10 % (aa00 == 0 ? 1 : aa00);
  for (long long i = 0; i < ka10; ++i) {
    cout << 1;
    --aa11;
  }
  for (long long i = 0; i < ma10; ++i) {
    cout << 0;
    --aa00;
  }
  if (aa11) {
    cout << 1;
    --aa11;
  }
  for (long long i = 0; i < aa00; ++i) {
    cout << 0;
  }
  for (long long i = 0; i < aa11; ++i) {
    cout << 1;
  }
  cout << endl;
  return 0;
}

```