#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> pos, neg;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    if (a < 0)
      neg.push_back(a);
    else
      pos.push_back(a);
  }
  bool solve = 0;
  for (int i = 0; i < pos.size(); i++)
    if (pos[i] > 0) cout << pos[i] << " ", solve = 1;
  sort(neg.begin(), neg.end());
  int x = neg.size() % 2;
  for (int i = 0; i < neg.size() - x; i++) cout << neg[i] << " ", solve = 1;
  if (solve == 0) {
    if (pos.size() > 0)
      cout << pos[0];
    else
      cout << neg[neg.size() - 1];
  }
  return 0;
}
