#include <bits/stdc++.h>
int fx[] = {-1, 0, +1, 0}, fy[] = {0, +1, 0, -1},
    ex[] = {-1, -1, 0, +1, +1, +1, 0, -1},
    ey[] = {0, +1, +1, +1, 0, -1, -1, -1};
using namespace std;
int n, t1, t2;
int v1[2000], v2[2000], a[2000];
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  sort(a, a + n);
  for (int i = 0; i < n; i++)
    if (a[i] < 0)
      v1[t1++] = a[i];
    else if (a[i] > 0)
      v2[t2++] = a[i];
  if (t1 <= 1 && !t2)
    printf("%d\n", a[n - 1]);
  else {
    t1 -= t1 & 1;
    for (int i = 0; i < t1; i++) printf("%d ", v1[i]);
    for (int i = 0; i < t2; i++) printf("%d ", v2[i]);
    printf("\n");
  }
  return 0;
}
