#include <bits/stdc++.h>
using namespace std;
int a[111];
int m1[111], m2[111], m3[111];
int main() {
  int n;
  while (scanf("%d", &n) != EOF) {
    int t1 = 0, t2 = 0, t3 = 0;
    for (int i = 1; i <= n; i++) {
      scanf("%d", &a[i]);
      if (a[i] < 0) m1[++t1] = a[i];
      if (a[i] == 0) m2[++t2] = a[i];
      if (a[i] > 0) m3[++t3] = a[i];
    }
    if (t1 == 0 && t3 == 0 && t2 > 0) {
      printf("0\n");
      continue;
    }
    if (t1 == 0 && t3 > 0) {
      for (int i = 1; i < t3; i++) {
        printf("%d ", m3[i]);
      }
      printf("%d\n", m3[t3]);
      continue;
    }
    if (t1 > 0) {
      if (t1 == 1 && t2 == 0 && t3 == 0) {
        printf("%d\n", m1[t1]);
        continue;
      }
      if (t1 == 1 && t2 > 0 && t3 == 0) {
        printf("0\n");
        continue;
      }
      if (t1 == 1 && t3 > 0) {
        for (int i = 1; i < t3; i++) {
          printf("%d ", m3[i]);
        }
        printf("%d\n", m3[t3]);
        continue;
      }
      sort(m1 + 1, m1 + t1 + 1);
      if (t1 & 1) {
        for (int i = 1; i <= t1 - 2; i++) {
          printf("%d ", m1[i]);
        }
        if (t3 == 0)
          printf("%d\n", m1[t1 - 1]);
        else {
          printf("%d ", m1[t1 - 1]);
          for (int i = 1; i < t3; i++) {
            printf("%d ", m3[i]);
          }
          printf("%d\n", m3[t3]);
        }
      } else {
        for (int i = 1; i <= t1 - 1; i++) {
          printf("%d ", m1[i]);
        }
        if (t3 == 0)
          printf("%d\n", m1[t1]);
        else {
          printf("%d ", m1[t1]);
          for (int i = 1; i < t3; i++) {
            printf("%d ", m3[i]);
          }
          printf("%d\n", m3[t3]);
        }
      }
    }
  }
  return 0;
}
