#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, neg = 0, zer = 0;
  cin >> n;
  vector<int> v, vk;
  for (int i = 0; i < n; i++) {
    int elem;
    cin >> elem;
    if (elem < 0)
      neg++;
    else if (elem == 0)
      zer++;
    v.push_back(elem);
  }
  sort(v.begin(), v.end(), greater<int>());
  bool ok = false;
  for (int i = 0; i < n; i++) {
    if (v[i] == 0)
      continue;
    else if (v[i] > 0)
      vk.push_back(v[i]);
  }
  if (vk.size() != 0) {
    if (neg > 1) {
      if (neg % 2 != 0) neg--;
    } else if (neg == 1)
      neg--;
  } else {
    if (neg > 1) {
      if (neg % 2 != 0) neg--;
    } else if (neg == 1) {
      if (zer >= 1) {
        vk.push_back(0);
        neg--;
      }
    } else if (neg == 0) {
      vk.push_back(0);
    }
  }
  for (int i = v.size() - 1; i >= 0; i--) {
    if (neg > 0) {
      vk.push_back(v[i]);
      neg--;
    }
  }
  for (auto i : vk) cout << i << " ";
  cout << endl;
}
