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