#include <bits/stdc++.h>
using namespace std;
template <class T>
void show(T a, int n) {
  for (int i = 0; i < n; ++i) cout << a[i] << ' ';
  cout << endl;
}
template <class T>
void show(T a, int r, int l) {
  for (int i = 0; i < r; ++i) show(a[i], l);
  cout << endl;
}
const int N = 1 << 10;
const int M = 5000;
const int oo = 10000 * 10000 * 10;
int n;
int a[N];
void solve() {
  int i, j, k;
  sort(a, a + n);
  if (n == 1) {
    printf("%d\n", a[0]);
    return;
  }
  int tn = 0;
  for (i = 0; i < n; ++i)
    if (a[i] != 0) a[tn++] = a[i];
  int neg = 0;
  for (i = 0; i < n; ++i) {
    if (a[i] < 0) neg++;
  }
  if (neg % 2 == 0) {
    if (tn == 0) {
      printf("0\n");
      return;
    } else {
      show(a, tn);
    }
  } else {
    if (neg == 1 && tn == 1) {
      printf("0\n");
    } else {
      for (i = 0; i + 1 < n && a[i + 1] < 0; ++i)
        ;
      swap(a[0], a[i]);
      show(a + 1, tn - 1);
    }
  }
}
int main() {
  int i, j, k;
  scanf("%d", &n);
  for (i = 0; i < n; ++i) scanf("%d", &a[i]);
  solve();
  return 0;
}
