#include <bits/stdc++.h>
using namespace std;
struct trip {
  int a, b, c;
};
const int MAXINT = 100;
int n, temp;
vector<int> pos, neg;
bool zeros = false;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> temp;
    if (temp > 0)
      pos.push_back(temp);
    else if (temp < 0)
      neg.push_back(temp);
    else
      zeros = true;
  }
  if (!pos.size() && !neg.size()) cout << 0 << endl;
  if (pos.size() == 0 && neg.size() == 1) {
    if (zeros)
      cout << 0 << endl;
    else
      cout << neg[0] << endl;
  }
  for (int e : pos) cout << e << " ";
  if (neg.size() % 2 == 0)
    for (int e : neg) cout << e << " ";
  else {
    sort(neg.begin(), neg.end());
    int N = neg.size();
    for (int i = 0; i < N - 1; i++) cout << neg[i] << " ";
  }
  return 0;
}
