#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e4 + 10;
int main() {
  int n;
  cin >> n;
  int a;
  vector<int> v, man;
  for (int i = 0; i < n; i++) {
    cin >> a;
    if (a > 0)
      v.push_back(a);
    else if (a < 0)
      man.push_back(a);
  }
  if (man.size() + v.size() == 0)
    cout << "0\n";
  else if (!v.size() && man.size() < n && man.size() == 1)
    cout << "0\n";
  else {
    if (v.size()) {
      for (int i = 0; i < v.size(); i++) cout << v[i] << " ";
      sort(man.begin(), man.end());
      for (int i = man.size() / 2 * 2 - 1; i >= 0; i--) cout << man[i] << " ";
    } else {
      if (man.size() == 1)
        cout << man[0] << "\n";
      else if (man.size() % 2) {
        sort(man.begin(), man.end());
        for (int i = 0; i < man.size() - 1; i++) cout << man[i] << " ";
      } else
        for (int i = 0; i < man.size(); i++) cout << man[i] << " ";
    }
  }
  return 0;
}
