#include <bits/stdc++.h>
using namespace std;
vector<int> p, m;
int main() {
  int n;
  cin >> n;
  if (n == 1) {
    int x;
    cin >> x;
    cout << x << endl;
    return 0;
  }
  for (int i = 1; i <= n; i++) {
    int x;
    cin >> x;
    if (x > 0)
      p.push_back(x);
    else if (x < 0)
      m.push_back(x);
  }
  if ((p.size() == 0 && m.size() == 0) || (m.size() == 1 && p.size() == 0)) {
    cout << 0 << endl;
    return 0;
  }
  for (int i = 0; i < p.size(); i++) cout << p[i] << " ";
  sort(m.begin(), m.end());
  reverse(m.begin(), m.end());
  if (m.size() % 2)
    for (int i = 1; i < m.size(); i++) cout << m[i] << " ";
  else
    for (int i = 0; i < m.size(); i++) cout << m[i] << " ";
  cout << endl;
  return 0;
}
