#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x;
  bool bo, nul = 0;
  vector<int> a, b;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x;
    if (x > 0) a.push_back(x);
    if (x < 0) b.push_back(x);
    if (x == 0) nul = 1;
  }
  sort(b.begin(), b.end());
  bo = !a.empty();
  for (int i = 0; i < a.size(); i++) cout << a[i] << " ";
  if (!b.empty()) {
    if (b.size() == 1 && !bo && nul) {
      cout << 0;
      return 0;
    }
    if (bo && b.size() & 1 == 1)
      b.erase(b.end() - 1);
    else if (!bo && b.size() > 1 && b.size() & 1 == 1)
      b.erase(b.end() - 1);
    for (int i = 0; i < b.size(); i++) cout << b[i] << " ";
  }
  if (a.empty() && b.empty()) cout << 0;
  fclose(stdin);
  fclose(stdout);
  return 0;
}
