#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a[202], b = 0, z = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] < 0) b++;
    if (a[i] > 0) z++;
  }
  sort(a, a + n);
  if ((z == 0) && ((b / 2) == 0)) cout << a[n - 1];
  for (int i = 0; i < z; i++) {
    cout << a[n - 1 - i] << " ";
  }
  if ((b % 2) == 1) {
    for (int i = 0; i < (b - 1); i++) cout << a[i] << " ";
  } else {
    for (int i = 0; i < b; i++) cout << a[i] << " ";
  }
  return 0;
}
