#include <bits/stdc++.h>
using namespace std;
template <class T>
ostream& operator<<(ostream& fout, const vector<T>& vec) {
  for (const auto& el : vec) {
    fout << el;
  }
  return fout;
}
template <class T>
istream& operator>>(istream& fin, vector<T>& vec) {
  for (size_t i = 0; i < vec.size(); ++i) {
    cin >> vec[i];
  }
  return fin;
}
vector<short> solve(int a1, int a2, int a3, int a4) {
  unordered_map<int64_t, int64_t> c;
  int64_t mx = 0;
  for (int64_t i = 1; i <= 100000; ++i) {
    c[i * (i - 1) / 2] = i;
    mx = max(mx, i * (i - 1) / 2);
  }
  if (a1 + a2 + a3 + a4 == 0) {
    cout << 0 << '\n';
    return {0};
  }
  if (c.find(a1) != c.end() && c.find(a4) != c.end()) {
    int n = c[a1];
    int m = c[a4];
    if (a2 + a3 == 0) {
      if (a1 == 0) {
        vector<short> res;
        for (int i = 0; i < m; ++i) {
          res.push_back(1);
        }
        cout << res << '\n';
        return res;
      } else if (a4 == 0) {
        vector<short> res;
        for (int i = 0; i < n; ++i) {
          res.push_back(0);
        }
        cout << res << '\n';
        return res;
      }
    }
    if (n * m != a2 + a3) {
      cout << "Impossible\n";
      return {};
    }
    vector<short> arg(n + m);
    for (int i = n; i < (int)arg.size(); ++i) {
      arg[i] = 1;
    }
    int q = a3 / n;
    int r = a3 % n;
    for (int i = 0; i < q; ++i) {
      swap(arg[i], arg[i + n]);
    }
    for (int i = 0; i < r; ++i) {
      swap(arg[q + n - i], arg[q + n - i - 1]);
    }
    assert(arg.size() < 10000000);
    cout << arg << '\n';
    return arg;
  } else {
    cout << "Impossible\n";
    return {};
  }
  return {};
}
int Solve() {
  int a1, a2, a3, a4;
  cin >> a1 >> a2 >> a3 >> a4;
  solve(a1, a2, a3, a4);
  return 0;
}
vector<int> check(vector<short> tst) {
  vector<int> a(4);
  int sz = tst.size();
  for (int i = 0; i < sz; ++i) {
    for (int j = i + 1; j < sz; ++j) {
      if (tst[i] == 0 && tst[j] == 0) {
        ++a[0];
      }
      if (tst[i] == 1 && tst[j] == 1) {
        ++a[3];
      }
      if (tst[i] == 0 && tst[j] == 1) {
        ++a[1];
      }
      if (tst[i] == 1 && tst[j] == 0) {
        ++a[2];
      }
    }
  }
  return a;
}
int stress() {
  while (true) {
    int sz = rand() % 10 + 1;
    vector<short> tst;
    for (int i = 0; i < sz; ++i) {
      tst.push_back(rand() % 2);
    }
    auto res = check(tst);
    auto res2 = check(solve(res[0], res[1], res[2], res[3]));
    if (res == res2) {
      cout << "OK\n";
    } else {
      cout << "NOT OK\n";
      cout << res[0] << ' ' << res[1] << ' ' << res[2] << ' ' << res[3] << '\n';
      cout << solve(res[0], res[1], res[2], res[3]) << '\n';
      break;
    }
  }
  return 0;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  Solve();
  return 0;
}

### Prompt

Your task is to create a Cpp solution 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;
template <class T>
ostream& operator<<(ostream& fout, const vector<T>& vec) {
  for (const auto& el : vec) {
    fout << el;
  }
  return fout;
}
template <class T>
istream& operator>>(istream& fin, vector<T>& vec) {
  for (size_t i = 0; i < vec.size(); ++i) {
    cin >> vec[i];
  }
  return fin;
}
vector<short> solve(int a1, int a2, int a3, int a4) {
  unordered_map<int64_t, int64_t> c;
  int64_t mx = 0;
  for (int64_t i = 1; i <= 100000; ++i) {
    c[i * (i - 1) / 2] = i;
    mx = max(mx, i * (i - 1) / 2);
  }
  if (a1 + a2 + a3 + a4 == 0) {
    cout << 0 << '\n';
    return {0};
  }
  if (c.find(a1) != c.end() && c.find(a4) != c.end()) {
    int n = c[a1];
    int m = c[a4];
    if (a2 + a3 == 0) {
      if (a1 == 0) {
        vector<short> res;
        for (int i = 0; i < m; ++i) {
          res.push_back(1);
        }
        cout << res << '\n';
        return res;
      } else if (a4 == 0) {
        vector<short> res;
        for (int i = 0; i < n; ++i) {
          res.push_back(0);
        }
        cout << res << '\n';
        return res;
      }
    }
    if (n * m != a2 + a3) {
      cout << "Impossible\n";
      return {};
    }
    vector<short> arg(n + m);
    for (int i = n; i < (int)arg.size(); ++i) {
      arg[i] = 1;
    }
    int q = a3 / n;
    int r = a3 % n;
    for (int i = 0; i < q; ++i) {
      swap(arg[i], arg[i + n]);
    }
    for (int i = 0; i < r; ++i) {
      swap(arg[q + n - i], arg[q + n - i - 1]);
    }
    assert(arg.size() < 10000000);
    cout << arg << '\n';
    return arg;
  } else {
    cout << "Impossible\n";
    return {};
  }
  return {};
}
int Solve() {
  int a1, a2, a3, a4;
  cin >> a1 >> a2 >> a3 >> a4;
  solve(a1, a2, a3, a4);
  return 0;
}
vector<int> check(vector<short> tst) {
  vector<int> a(4);
  int sz = tst.size();
  for (int i = 0; i < sz; ++i) {
    for (int j = i + 1; j < sz; ++j) {
      if (tst[i] == 0 && tst[j] == 0) {
        ++a[0];
      }
      if (tst[i] == 1 && tst[j] == 1) {
        ++a[3];
      }
      if (tst[i] == 0 && tst[j] == 1) {
        ++a[1];
      }
      if (tst[i] == 1 && tst[j] == 0) {
        ++a[2];
      }
    }
  }
  return a;
}
int stress() {
  while (true) {
    int sz = rand() % 10 + 1;
    vector<short> tst;
    for (int i = 0; i < sz; ++i) {
      tst.push_back(rand() % 2);
    }
    auto res = check(tst);
    auto res2 = check(solve(res[0], res[1], res[2], res[3]));
    if (res == res2) {
      cout << "OK\n";
    } else {
      cout << "NOT OK\n";
      cout << res[0] << ' ' << res[1] << ' ' << res[2] << ' ' << res[3] << '\n';
      cout << solve(res[0], res[1], res[2], res[3]) << '\n';
      break;
    }
  }
  return 0;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  Solve();
  return 0;
}

```