    import java.nio.file.Paths;
    import  java.util.*;
    import  java.io.*;
    public class JavaApplication1 {

    //================================================
    //================================================
        // O(long(n))
        static long binpow(long a, long n){
            if (n == 0) return 1;
            if (n % 2 == 1){
                return binpow(a, n-1) * a;
            }else {
                long b = binpow(a, n/2);
                return b * b;
            }
        }

        // O(log(min(a,b))
        static long gcd(long a, long b){
            if (b == 0) return a;
            else return gcd(b, a % b);
        }

        // O(log(min(a,b))
        static long lcd(long a, long b){
            return a / gcd(a,b) * b;
        }
    //===============================================
    //===============================================

        void run(){
            /*try {
                Scanner in = new Scanner(Paths.get("skateboard.in"), "UTF-8");
                PrintWriter out = new PrintWriter("skateboard.out", "UTF-8");
                slove(in, out);
            }catch (IOException e){
                throw new Error(e);

            }
            */
            Scanner in = new Scanner(System.in);
            PrintWriter out = new PrintWriter(System.out);
            slove(in, out);
        }
        void  slove(Scanner in, PrintWriter out){
            int n = in.nextInt();
            boolean oneTask = false;
            int[] pro = new int[n];

            for(int i = 0; i < n; i++){
                pro[i] = in.nextInt();
            }

            Arrays.sort(pro);

            for(int i = n-1; i >= 0; i--){
                if(pro[i] >= 0){
                     oneTask = true;
                     out.print(pro[i]+ " ");
                     out.flush();
                }
                else if(pro[i] < 0){
                    if( (i+1) % 2 == 0 && i != 0){
                        for(int j = i; j>=0; j--){
                            oneTask = true;
                            out.print(pro[i]+ " ");
                            out.flush();
                        }
                        break;
                    }else if ( i % 2 == 0 && i != 0 && oneTask==true){
                            for(int j = i-1; j >= 0; j--){
                                out.print(pro[0]+ " ");
                                out.flush();
                            }
                    }else if(i == 0 && oneTask == false){
                            oneTask = true;
                            out.print(pro[0]+ " ");
                            out.flush();
                    }
                    break;
                }

            }

        }
    //================================================
    //================================================
        public static void main(String[] args) {
            new JavaApplication1().run();
        }
    }


    import java.nio.file.Paths;
    import  java.util.*;
    import  java.io.*;
    public class JavaApplication1 {

    //================================================
    //================================================
        // O(long(n))
        static long binpow(long a, long n){
            if (n == 0) return 1;
            if (n % 2 == 1){
                return binpow(a, n-1) * a;
            }else {
                long b = binpow(a, n/2);
                return b * b;
            }
        }

        // O(log(min(a,b))
        static long gcd(long a, long b){
            if (b == 0) return a;
            else return gcd(b, a % b);
        }

        // O(log(min(a,b))
        static long lcd(long a, long b){
            return a / gcd(a,b) * b;
        }
    //===============================================
    //===============================================

        void run(){
            /*try {
                Scanner in = new Scanner(Paths.get("skateboard.in"), "UTF-8");
                PrintWriter out = new PrintWriter("skateboard.out", "UTF-8");
                slove(in, out);
            }catch (IOException e){
                throw new Error(e);

            }
            */
            Scanner in = new Scanner(System.in);
            PrintWriter out = new PrintWriter(System.out);
            slove(in, out);
        }
        void  slove(Scanner in, PrintWriter out){
            int n = in.nextInt();
            boolean oneTask = false;
            boolean hasZero = false;
            int[] pro = new int[n];

            for(int i = 0; i < n; i++){
                pro[i] = in.nextInt();
            }

            for(int i = 0; i < n; i++){
                if(pro[i] == 0){
                    hasZero = true;
                    for(int j = i;  j < n-1; j++){
                        pro[j] = pro[j+1];
                    }
                    i--;
                    n = n-1;
                }
            }

            Arrays.sort(pro, 0, n);
//            out.flush();
//            out.println();
//            for(int i =0; i< n; i++){
//                out.print(pro[i] + " ");
//                out.flush();
//            }
//            out.println();
//
            for(int i = n-1; i >= 0; i--){

                 if(pro[i] > 0){
                   out.print(pro[i] + " ");
                   out.flush();
                   oneTask = true;
                }

                if(pro[i] < 0){

                    if((i+1) % 2 == 0 && i != 0){
                        oneTask = true;
                        for(int j = i; j>=0; j--){
                            out.print(pro[j] + " ");
                            out.flush();
                        }
                    }
                    else if(i % 2 == 0 && i != 0){
                        oneTask = true;
                        for(int j = i-1; j>=0; j--){
                            out.print(pro[j] + " ");
                            out.flush();
                        }
                    }
                    else if(i == 0 && oneTask == false){

                            out.print(pro[i]);
                            out.flush();

                    }
                    break;
                }
            }
             if(hasZero){
                            out.print("0");
                            out.flush();
                        }

        }
    //================================================
    //================================================
        public static void main(String[] args) {
            new JavaApplication1().run();
        }
    }


    import java.nio.file.Paths;
    import  java.util.*;
    import  java.io.*;
    public class JavaApplication1 {

    //================================================
    //================================================
        // O(long(n))
        static long binpow(long a, long n){
            if (n == 0) return 1;
            if (n % 2 == 1){
                return binpow(a, n-1) * a;
            }else {
                long b = binpow(a, n/2);
                return b * b;
            }
        }

        // O(log(min(a,b))
        static long gcd(long a, long b){
            if (b == 0) return a;
            else return gcd(b, a % b);
        }

        // O(log(min(a,b))
        static long lcd(long a, long b){
            return a / gcd(a,b) * b;
        }
    //===============================================
    //===============================================

        void run(){
            /*try {
                Scanner in = new Scanner(Paths.get("skateboard.in"), "UTF-8");
                PrintWriter out = new PrintWriter("skateboard.out", "UTF-8");
                slove(in, out);
            }catch (IOException e){
                throw new Error(e);

            }
            */
            Scanner in = new Scanner(System.in);
            PrintWriter out = new PrintWriter(System.out);
            slove(in, out);
        }
        void  slove(Scanner in, PrintWriter out){
            int n = in.nextInt();
            boolean oneTask = false;
            boolean hasZero = false;
            int[] pro = new int[n];

            for(int i = 0; i < n; i++){
                pro[i] = in.nextInt();
            }

            for(int i = 0; i < n; i++){
                if(pro[i] == 0){
                    hasZero = true;
                    for(int j = i;  j < n-1; j++){
                        pro[j] = pro[j+1];
                    }
                    i--;
                    n = n-1;
                }
            }

            Arrays.sort(pro, 0, n);

            for(int i = n-1; i >= 0; i--){
                if(pro[i] >= 0){
                     oneTask = true;
                     out.print(pro[i]+ " ");
                     out.flush();
                }

                else if(pro[i] < 0){
                    if((i+1) % 2 == 0 && i != 0){

                        for(int j = i; j>=0; j--){
                            oneTask = true;
                            out.print(pro[j]+ " ");
                            out.flush();
                        }

                    }else if (i % 2 == 0 && i != 0){

                            for(int j = i-1; j >= 0; j--){
                                out.print(pro[j]+ " ");
                                out.flush();
                            }

                    }else if(i == 0 && oneTask == false){
                            if(hasZero){
                            out.print("0");
                            out.flush();
                            }else{
                            oneTask = true;
                            out.print(pro[0]+ " ");
                            out.flush();
                            }
                    }

                }
                break;
            }

        }
    //================================================
    //================================================
        public static void main(String[] args) {
            new JavaApplication1().run();
        }
    }


    import java.nio.file.Paths;
    import  java.util.*;
    import  java.io.*;
    public class JavaApplication1 {

    //================================================
    //================================================
        // O(long(n))
        static long binpow(long a, long n){
            if (n == 0) return 1;
            if (n % 2 == 1){
                return binpow(a, n-1) * a;
            }else {
                long b = binpow(a, n/2);
                return b * b;
            }
        }

        // O(log(min(a,b))
        static long gcd(long a, long b){
            if (b == 0) return a;
            else return gcd(b, a % b);
        }

        // O(log(min(a,b))
        static long lcd(long a, long b){
            return a / gcd(a,b) * b;
        }
    //===============================================
    //===============================================

        void run(){
            /*try {
                Scanner in = new Scanner(Paths.get("skateboard.in"), "UTF-8");
                PrintWriter out = new PrintWriter("skateboard.out", "UTF-8");
                slove(in, out);
            }catch (IOException e){
                throw new Error(e);

            }
            */
            Scanner in = new Scanner(System.in);
            PrintWriter out = new PrintWriter(System.out);
            slove(in, out);
        }
        void  slove(Scanner in, PrintWriter out){
            int n = in.nextInt();
            boolean oneTask = false;
            int[] pro = new int[n];

            for(int i = 0; i < n; i++){
                pro[i] = in.nextInt();
            }

            Arrays.sort(pro);

            for(int i = n-1; i >= 0; i--){
                if(pro[i] >= 0){
                     oneTask = true;
                     out.print(pro[i]+ " ");
                     out.flush();
                }
                else if(pro[i] < 0){

                    if((i+1) % 2 == 0 && i != 0){

                        for(int j = i; j>=0; j--){
                            oneTask = true;
                            out.print(pro[j]+ " ");
                            out.flush();
                        }
                        break;
                    }else if ( i % 2 == 0 && i != 0){

                            for(int j = i-1; j >= 0; j--){
                                out.print(pro[j]+ " ");
                                out.flush();
                            }
                        break;
                    }else if(i == 0 && oneTask == false){

                            oneTask = true;
                            out.print(pro[0]+ " ");
                            out.flush();
                    }
                    break;
                }

            }

        }
    //================================================
    //================================================
        public static void main(String[] args) {
            new JavaApplication1().run();
        }
    }


    import java.nio.file.Paths;
    import  java.util.*;
    import  java.io.*;
    public class JavaApplication1 {

    //================================================
    //================================================
        // O(long(n))
        static long binpow(long a, long n){
            if (n == 0) return 1;
            if (n % 2 == 1){
                return binpow(a, n-1) * a;
            }else {
                long b = binpow(a, n/2);
                return b * b;
            }
        }

        // O(log(min(a,b))
        static long gcd(long a, long b){
            if (b == 0) return a;
            else return gcd(b, a % b);
        }

        // O(log(min(a,b))
        static long lcd(long a, long b){
            return a / gcd(a,b) * b;
        }
    //===============================================
    //===============================================

        void run(){
            /*try {
                Scanner in = new Scanner(Paths.get("skateboard.in"), "UTF-8");
                PrintWriter out = new PrintWriter("skateboard.out", "UTF-8");
                slove(in, out);
            }catch (IOException e){
                throw new Error(e);

            }
            */
            Scanner in = new Scanner(System.in);
            PrintWriter out = new PrintWriter(System.out);
            slove(in, out);
        }
        void  slove(Scanner in, PrintWriter out){
            int n = in.nextInt();
            boolean oneTask = false;
            boolean hasZero = false;
            int[] pro = new int[n];

            for(int i = 0; i < n; i++){
                pro[i] = in.nextInt();
            }

            for(int i = 0; i < n; i++){
                if(pro[i] == 0){
                    hasZero = true;
                    for(int j = i;  j < n-1; j++){
                        pro[j] = pro[j+1];
                    }
                    i--;
                    n = n-1;
                }
            }

            Arrays.sort(pro, 0, n);
//            out.flush();
//            out.println();
//            for(int i =0; i< n; i++){
//                out.print(pro[i] + " ");
//                out.flush();
//            }
//            out.println();
//
            for(int i = n-1; i >= 0; i--){

                 if(pro[i] > 0){
                   out.print(pro[i] + " ");
                   out.flush();
                   oneTask = true;
                }

                if(pro[i] < 0){

                    if((i+1) % 2 == 0 && i != 0){
                        oneTask = true;
                        for(int j = i; j>=0; j--){
                            out.print(pro[j] + " ");
                            out.flush();
                        }
                    }
                    else if(i % 2 == 0 && i != 0){
                        oneTask = true;
                        for(int j = i-1; j>=0; j--){
                            out.print(pro[j] + " ");
                            out.flush();
                        }
                    }
                    else if(i == 0 && oneTask == false){
                        if(hasZero){
                            out.print("0");
                            out.flush();
                        }else{
                            out.print(pro[i]);
                            out.flush();
                        }
                    }
                    break;
                }
            }

        }
    //================================================
    //================================================
        public static void main(String[] args) {
            new JavaApplication1().run();
        }
    }


    import java.nio.file.Paths;
    import  java.util.*;
    import  java.io.*;
    public class JavaApplication1 {

    //================================================
    //================================================
        // O(long(n))
        static long binpow(long a, long n){
            if (n == 0) return 1;
            if (n % 2 == 1){
                return binpow(a, n-1) * a;
            }else {
                long b = binpow(a, n/2);
                return b * b;
            }
        }

        // O(log(min(a,b))
        static long gcd(long a, long b){
            if (b == 0) return a;
            else return gcd(b, a % b);
        }

        // O(log(min(a,b))
        static long lcd(long a, long b){
            return a / gcd(a,b) * b;
        }
    //===============================================
    //===============================================

        void run(){
            /*try {
                Scanner in = new Scanner(Paths.get("skateboard.in"), "UTF-8");
                PrintWriter out = new PrintWriter("skateboard.out", "UTF-8");
                slove(in, out);
            }catch (IOException e){
                throw new Error(e);

            }
            */
            Scanner in = new Scanner(System.in);
            PrintWriter out = new PrintWriter(System.out);
            slove(in, out);
        }
        void  slove(Scanner in, PrintWriter out){
            int n = in.nextInt();
            boolean oneTask = false;
            boolean hasZero = false;
            int[] pro = new int[n];

            for(int i = 0; i < n; i++){
                pro[i] = in.nextInt();
            }

            for(int i = 0; i < n; i++){
                if(pro[i] == 0){
                    hasZero = true;
                    for(int j = i;  j < n-1; j++){
                        pro[j] = pro[j+1];
                    }
                    i--;
                    n = n-1;
                }
            }

            Arrays.sort(pro, 0, n);
//            out.flush();
//            out.println();
//            for(int i =0; i< n; i++){
//                out.print(pro[i] + " ");
//                out.flush();
//            }
//            out.println();
//
            for(int i = n-1; i >= 0; i--){

                 if(pro[i] > 0){
                   out.print(pro[i] + " ");
                   out.flush();
                   oneTask = true;
                }

                if(pro[i] < 0){

                    if((i+1) % 2 == 0 && i != 0){
                        oneTask = true;
                        for(int j = i; j>=0; j--){
                            out.print(pro[j] + " ");
                            out.flush();
                        }
                    }
                    else if(i % 2 == 0 && i != 0){
                        oneTask = true;
                        for(int j = i-1; j>=0; j--){
                            out.print(pro[j] + " ");
                            out.flush();
                        }
                    }
                    else if(i == 0 && oneTask == false){
                        if(hasZero){
                            out.print("0");
                            out.flush();
                            hasZero = false;
                        }else{
                            out.print(pro[i]);
                            out.flush();
                        }
                    }
                    break;
                }
            }

        }
    //================================================
    //================================================
        public static void main(String[] args) {
            new JavaApplication1().run();
        }
    }


    import java.nio.file.Paths;
    import  java.util.*;
    import  java.io.*;
    public class JavaApplication1 {

    //================================================
    //================================================
        // O(long(n))
        static long binpow(long a, long n){
            if (n == 0) return 1;
            if (n % 2 == 1){
                return binpow(a, n-1) * a;
            }else {
                long b = binpow(a, n/2);
                return b * b;
            }
        }

        // O(log(min(a,b))
        static long gcd(long a, long b){
            if (b == 0) return a;
            else return gcd(b, a % b);
        }

        // O(log(min(a,b))
        static long lcd(long a, long b){
            return a / gcd(a,b) * b;
        }
    //===============================================
    //===============================================

        void run(){
            /*try {
                Scanner in = new Scanner(Paths.get("skateboard.in"), "UTF-8");
                PrintWriter out = new PrintWriter("skateboard.out", "UTF-8");
                slove(in, out);
            }catch (IOException e){
                throw new Error(e);

            }
            */
            Scanner in = new Scanner(System.in);
            PrintWriter out = new PrintWriter(System.out);
            slove(in, out);
        }
        void  slove(Scanner in, PrintWriter out){
            int n = in.nextInt();
            boolean oneTask = false;
            boolean hasZero = false;
            int[] pro = new int[n];

            for(int i = 0; i < n; i++){
                pro[i] = in.nextInt();
            }

            for(int i = 0; i < n; i++){
                if(pro[i] == 0){
                    hasZero = true;
                    for(int j = i;  j < n-1; j++){
                        pro[j] = pro[j+1];
                    }
                    i--;
                    n = n-1;
                }
            }

            Arrays.sort(pro, 0, n);
//            out.flush();
//            out.println();
//            for(int i =0; i< n; i++){
//                out.print(pro[i] + " ");
//                out.flush();
//            }
//            out.println();
//
            for(int i = n-1; i >= 0; i--){

                 if(pro[i] > 0){
                   out.print(pro[i] + " ");
                   out.flush();
                   oneTask = true;
                }

                if(pro[i] < 0){

                    if((i+1) % 2 == 0 && i != 0){
                        oneTask = true;
                        for(int j = i; j>=0; j--){
                            out.print(pro[j] + " ");
                            out.flush();
                        }
                    }
                    else if(i % 2 == 0 && i != 0){
                        oneTask = true;
                        for(int j = i-1; j>=0; j--){
                            out.print(pro[j] + " ");
                            out.flush();
                        }
                    }
                    else if(i == 0 && oneTask == false){
                        if(hasZero){
                            out.print("0");
                            out.flush();
                            hasZero = false;
                        }else{
                            out.print(pro[i]);
                            out.flush();
                        }
                    }
                    break;
                }
            }
             if(hasZero && oneTask == false){
                            out.print("0");
                            out.flush();
                        }

        }
    //================================================
    //================================================
        public static void main(String[] args) {
            new JavaApplication1().run();
        }
    }


    import java.nio.file.Paths;
    import  java.util.*;
    import  java.io.*;
    public class JavaApplication1 {

    //================================================
    //================================================
        // O(long(n))
        static long binpow(long a, long n){
            if (n == 0) return 1;
            if (n % 2 == 1){
                return binpow(a, n-1) * a;
            }else {
                long b = binpow(a, n/2);
                return b * b;
            }
        }

        // O(log(min(a,b))
        static long gcd(long a, long b){
            if (b == 0) return a;
            else return gcd(b, a % b);
        }

        // O(log(min(a,b))
        static long lcd(long a, long b){
            return a / gcd(a,b) * b;
        }
    //===============================================
    //===============================================

        void run(){
            /*try {
                Scanner in = new Scanner(Paths.get("skateboard.in"), "UTF-8");
                PrintWriter out = new PrintWriter("skateboard.out", "UTF-8");
                slove(in, out);
            }catch (IOException e){
                throw new Error(e);

            }
            */
            Scanner in = new Scanner(System.in);
            PrintWriter out = new PrintWriter(System.out);
            slove(in, out);
        }
        void  slove(Scanner in, PrintWriter out){
            int n = in.nextInt();
            boolean oneTask = false;
            int[] pro = new int[n];

            for(int i = 0; i < n; i++){
                pro[i] = in.nextInt();
            }

            Arrays.sort(pro);

            for(int i = n-1; i >= 0; i--){
                if(pro[i] >= 0){
                     oneTask = true;
                     out.print(pro[i]+ " ");
                     out.flush();
                }
                else if(pro[i] < 0){
                    if(i % 2 == 0 && i != 0){
                        for(int j = i; j>=0; j--){
                            oneTask = true;
                            out.print(pro[i]+ " ");
                            out.flush();
                        }
                    }else if ((i-1) % 2 == 0 && i-1 > 0 && oneTask==true){
                            for(int j = i-1; j >= 0; j--){
                                out.print(pro[0]+ " ");
                                out.flush();
                            }
                    }else if(i == 0 && oneTask == false){
                            oneTask = true;
                            out.print(pro[0]+ " ");
                            out.flush();
                    }
                    break;
                }

            }

        }
    //================================================
    //================================================
        public static void main(String[] args) {
            new JavaApplication1().run();
        }
    }


    import java.nio.file.Paths;
    import  java.util.*;
    import  java.io.*;
    public class JavaApplication1 {

    //================================================
    //================================================
        // O(long(n))
        static long binpow(long a, long n){
            if (n == 0) return 1;
            if (n % 2 == 1){
                return binpow(a, n-1) * a;
            }else {
                long b = binpow(a, n/2);
                return b * b;
            }
        }

        // O(log(min(a,b))
        static long gcd(long a, long b){
            if (b == 0) return a;
            else return gcd(b, a % b);
        }

        // O(log(min(a,b))
        static long lcd(long a, long b){
            return a / gcd(a,b) * b;
        }
    //===============================================
    //===============================================

        void run(){
            /*try {
                Scanner in = new Scanner(Paths.get("skateboard.in"), "UTF-8");
                PrintWriter out = new PrintWriter("skateboard.out", "UTF-8");
                slove(in, out);
            }catch (IOException e){
                throw new Error(e);

            }
            */
            Scanner in = new Scanner(System.in);
            PrintWriter out = new PrintWriter(System.out);
            slove(in, out);
        }
        void  slove(Scanner in, PrintWriter out){
            int n = in.nextInt();
            boolean oneTask = false;
            boolean hasZero = false;
            int[] pro = new int[n];

            for(int i = 0; i < n; i++){
                pro[i] = in.nextInt();
            }

            for(int i = 0; i < n; i++){
                if(pro[i] == 0){
                    hasZero = true;
                    for(int j = i;  j < n-1; j++){
                        pro[j] = pro[j+1];
                    }
                    i--;
                    n = n-1;
                }
            }

            Arrays.sort(pro, 0, n);
//            out.flush();
//            out.println();
//            for(int i =0; i< n; i++){
//                out.print(pro[i] + " ");
//                out.flush();
//            }
//            out.println();
//
            for(int i = n-1; i >= 0; i--){

                 if(pro[i] > 0){
                   out.print(pro[i] + " ");
                   out.flush();
                   oneTask = true;
                }

                if(pro[i] < 0){

                    if((i+1) % 2 == 0 && i != 0){
                        oneTask = true;
                        for(int j = i; j>=0; j--){
                            out.print(pro[j] + " ");
                            out.flush();
                        }
                    }
                    else if(i % 2 == 0 && i != 0){
                        oneTask = true;
                        for(int j = i-1; j>=0; j--){
                            out.print(pro[j] + " ");
                            out.flush();
                        }
                    }
                    else if(i == 0 && oneTask == false){
                        if(hasZero){
                            out.print("0");
                            out.flush();
                            hasZero = false;
                        }else{
                            out.print(pro[i]);
                            out.flush();
                        }
                    }
                    break;
                }
            }
             if(hasZero){
                            out.print(" 0");
                            out.flush();
                        }

        }
    //================================================
    //================================================
        public static void main(String[] args) {
            new JavaApplication1().run();
        }
    }


    import java.nio.file.Paths;
    import  java.util.*;
    import  java.io.*;
    public class JavaApplication1 {

    //================================================
    //================================================
        // O(long(n))
        static long binpow(long a, long n){
            if (n == 0) return 1;
            if (n % 2 == 1){
                return binpow(a, n-1) * a;
            }else {
                long b = binpow(a, n/2);
                return b * b;
            }
        }

        // O(log(min(a,b))
        static long gcd(long a, long b){
            if (b == 0) return a;
            else return gcd(b, a % b);
        }

        // O(log(min(a,b))
        static long lcd(long a, long b){
            return a / gcd(a,b) * b;
        }
    //===============================================
    //===============================================

        void run(){
            /*try {
                Scanner in = new Scanner(Paths.get("skateboard.in"), "UTF-8");
                PrintWriter out = new PrintWriter("skateboard.out", "UTF-8");
                slove(in, out);
            }catch (IOException e){
                throw new Error(e);

            }
            */
            Scanner in = new Scanner(System.in);
            PrintWriter out = new PrintWriter(System.out);
            slove(in, out);
        }
        void  slove(Scanner in, PrintWriter out){
            int n = in.nextInt();
            boolean oneTask = false;
            boolean hasZero = false;
            int[] pro = new int[n];

            for(int i = 0; i < n; i++){
                pro[i] = in.nextInt();
            }

            for(int i = 0; i < n; i++){
                if(pro[i] == 0){
                    hasZero = true;
                    for(int j = i;  j < n-1; j++){
                        pro[j] = pro[j+1];
                    }
                    i--;
                    n = n-1;
                }
            }

            Arrays.sort(pro, 0, n);
//            out.flush();
//            out.println();
//            for(int i =0; i< n; i++){
//                out.print(pro[i] + " ");
//                out.flush();
//            }
//            out.println();
//
            for(int i = n-1; i >= 0; i--){

                 if(pro[i] > 0){
                   out.print(pro[i] + " ");
                   out.flush();
                   oneTask = true;
                }

                if(pro[i] < 0){

                    if((i+1) % 2 == 0 && i != 0){
                        oneTask = true;
                        for(int j = i; j>=0; j--){
                            out.print(pro[j] + " ");
                            out.flush();
                        }
                    }
                    else if(i % 2 == 0 && i != 0){
                        oneTask = true;
                        for(int j = i-1; j>=0; j--){
                            out.print(pro[j] + " ");
                            out.flush();
                        }
                    }
                    else if(i == 0 && oneTask == false){

                            out.print(pro[i]);
                            out.flush();

                    }
                    break;
                }
            }
             if(hasZero){
                            out.print(" 0");
                            out.flush();
                        }

        }
    //================================================
    //================================================
        public static void main(String[] args) {
            new JavaApplication1().run();
        }
    }


    import java.nio.file.Paths;
    import  java.util.*;
    import  java.io.*;
    public class JavaApplication1 {

    //================================================
    //================================================
        // O(long(n))
        static long binpow(long a, long n){
            if (n == 0) return 1;
            if (n % 2 == 1){
                return binpow(a, n-1) * a;
            }else {
                long b = binpow(a, n/2);
                return b * b;
            }
        }

        // O(log(min(a,b))
        static long gcd(long a, long b){
            if (b == 0) return a;
            else return gcd(b, a % b);
        }

        // O(log(min(a,b))
        static long lcd(long a, long b){
            return a / gcd(a,b) * b;
        }
    //===============================================
    //===============================================

        void run(){
            /*try {
                Scanner in = new Scanner(Paths.get("skateboard.in"), "UTF-8");
                PrintWriter out = new PrintWriter("skateboard.out", "UTF-8");
                slove(in, out);
            }catch (IOException e){
                throw new Error(e);

            }
            */
            Scanner in = new Scanner(System.in);
            PrintWriter out = new PrintWriter(System.out);
            slove(in, out);
        }
        void  slove(Scanner in, PrintWriter out){
            int n = in.nextInt();
            boolean oneTask = false;
            boolean hasZero = false;
            int[] pro = new int[n];

            for(int i = 0; i < n; i++){
                pro[i] = in.nextInt();
            }

            for(int i = 0; i < n; i++){
                if(pro[i] == 0){
                    hasZero = true;
                    for(int j = i;  j < n-1; j++){
                        pro[j] = pro[j+1];
                    }
                    i--;
                    n = n-1;
                }
            }

            Arrays.sort(pro, 0, n);
//            out.flush();
//            out.println();
//            for(int i =0; i< n; i++){
//                out.print(pro[i] + " ");
//                out.flush();
//            }
//            out.println();
//
            for(int i = n-1; i >= 0; i--){

                 if(pro[i] > 0){
                   out.print(pro[i] + " ");
                   out.flush();
                   oneTask = true;
                }

                if(pro[i] < 0){

                    if((i+1) % 2 == 0 && i != 0){
                        oneTask = true;
                        for(int j = i; j>=0; j--){
                            out.print(pro[j] + " ");
                            out.flush();
                        }
                    }
                    else if(i % 2 == 0 && i != 0){
                        oneTask = true;
                        for(int j = i-1; j>=0; j--){
                            out.print(pro[j] + " ");
                            out.flush();
                        }
                    }
                    else if(i == 0 && oneTask == false){
                        if(hasZero){
                            out.print("0");
                            out.flush();
                            hasZero = false;
                        }else{
                            out.print(pro[i]);
                            out.flush();
                        }
                    }
                    break;
                }
            }
             if(hasZero){
                            out.print("0");
                            out.flush();
                        }

        }
    //================================================
    //================================================
        public static void main(String[] args) {
            new JavaApplication1().run();
        }
    }


    import java.nio.file.Paths;
    import  java.util.*;
    import  java.io.*;
    public class JavaApplication1 {

    //================================================
    //================================================
        // O(long(n))
        static long binpow(long a, long n){
            if (n == 0) return 1;
            if (n % 2 == 1){
                return binpow(a, n-1) * a;
            }else {
                long b = binpow(a, n/2);
                return b * b;
            }
        }

        // O(log(min(a,b))
        static long gcd(long a, long b){
            if (b == 0) return a;
            else return gcd(b, a % b);
        }

        // O(log(min(a,b))
        static long lcd(long a, long b){
            return a / gcd(a,b) * b;
        }
    //===============================================
    //===============================================

        void run(){
            /*try {
                Scanner in = new Scanner(Paths.get("skateboard.in"), "UTF-8");
                PrintWriter out = new PrintWriter("skateboard.out", "UTF-8");
                slove(in, out);
            }catch (IOException e){
                throw new Error(e);

            }
            */
            Scanner in = new Scanner(System.in);
            PrintWriter out = new PrintWriter(System.out);
            slove(in, out);
        }
        void  slove(Scanner in, PrintWriter out){
            int n = in.nextInt();
            boolean oneTask = false;
            boolean hasZero = false;
            int[] pro = new int[n];

            for(int i = 0; i < n; i++){
                pro[i] = in.nextInt();
            }

            for(int i = 0; i < n; i++){
                if(pro[i] == 0){
                    hasZero = true;
                    for(int j = i;  j < n-1; j++){
                        pro[j] = pro[j+1];
                    }
                    i--;
                    n = n-1;
                }
            }

            Arrays.sort(pro, 0, n);
//            out.flush();
//            out.println();
//            for(int i =0; i< n; i++){
//                out.print(pro[i] + " ");
//                out.flush();
//            }
//            out.println();
//
            for(int i = n-1; i >= 0; i--){

                 if(pro[i] > 0){
                   out.print(pro[i] + " ");
                   out.flush();
                   oneTask = true;
                }

                if(pro[i] < 0){

                    if((i+1) % 2 == 0 && i != 0){
                        oneTask = true;
                        for(int j = i; j>=0; j--){
                            out.print(pro[j] + " ");
                            out.flush();
                        }
                    }
                    else if(i % 2 == 0 && i != 0){
                        oneTask = true;
                        for(int j = i-1; j>=0; j--){
                            out.print(pro[j] + " ");
                            out.flush();
                        }
                    }
                    else if(i == 0 && oneTask == false){
                        if(hasZero){
                            out.print(" 0");
                            out.flush();
                            hasZero = false;
                        }else{
                            out.print(pro[i]);
                            out.flush();
                        }
                    }
                    break;
                }
            }
             if(hasZero){
                            out.print(" 0");
                            out.flush();
                        }

        }
    //================================================
    //================================================
        public static void main(String[] args) {
            new JavaApplication1().run();
        }
    }


    import java.nio.file.Paths;
    import  java.util.*;
    import  java.io.*;
    public class JavaApplication1 {

    //================================================
    //================================================
        // O(long(n))
        static long binpow(long a, long n){
            if (n == 0) return 1;
            if (n % 2 == 1){
                return binpow(a, n-1) * a;
            }else {
                long b = binpow(a, n/2);
                return b * b;
            }
        }

        // O(log(min(a,b))
        static long gcd(long a, long b){
            if (b == 0) return a;
            else return gcd(b, a % b);
        }

        // O(log(min(a,b))
        static long lcd(long a, long b){
            return a / gcd(a,b) * b;
        }
    //===============================================
    //===============================================

        void run(){
            /*try {
                Scanner in = new Scanner(Paths.get("skateboard.in"), "UTF-8");
                PrintWriter out = new PrintWriter("skateboard.out", "UTF-8");
                slove(in, out);
            }catch (IOException e){
                throw new Error(e);

            }
            */
            Scanner in = new Scanner(System.in);
            PrintWriter out = new PrintWriter(System.out);
            slove(in, out);
        }
        void  slove(Scanner in, PrintWriter out){
            int n = in.nextInt();
            boolean oneTask = false;
            boolean hasZero = false;
            int[] pro = new int[n];

            for(int i = 0; i < n; i++){
                pro[i] = in.nextInt();
            }

            for(int i = 0; i < n; i++){
                if(pro[i] == 0){
                    hasZero = true;
                    for(int j = i;  j < n-1; j++){
                        pro[j] = pro[j+1];
                    }
                    i--;
                    n = n-1;
                }
            }

            Arrays.sort(pro, 0, n);

            out.flush();
            for(int i = n-1; i >= 0; i--){
                if(pro[i] >= 0){
                     oneTask = true;
                     out.print(pro[i]+ " ");
                     out.flush();
                }

                else if(pro[i] < 0){
                    if((i+1) % 2 == 0 && i != 0){

                        for(int j = i; j>=0; j--){
                            oneTask = true;
                            out.print(pro[j]+ " ");
                            out.flush();
                        }

                    }else if (i % 2 == 0 && i != 0){

                            for(int j = i-1; j >= 0; j--){
                                out.print(pro[j]+ " ");
                                out.flush();
                            }

                    }else if(i == 0 && oneTask == false){
                            if(hasZero){
                            out.print("0");
                            out.flush();
                            }else{
                            oneTask = true;
                            out.print(pro[0]+ " ");
                            out.flush();
                            }
                    }
                    break;

                }

            }

        }
    //================================================
    //================================================
        public static void main(String[] args) {
            new JavaApplication1().run();
        }
    }


    import java.nio.file.Paths;
    import  java.util.*;
    import  java.io.*;
    public class JavaApplication1 {

    //================================================
    //================================================
        // O(long(n))
        static long binpow(long a, long n){
            if (n == 0) return 1;
            if (n % 2 == 1){
                return binpow(a, n-1) * a;
            }else {
                long b = binpow(a, n/2);
                return b * b;
            }
        }

        // O(log(min(a,b))
        static long gcd(long a, long b){
            if (b == 0) return a;
            else return gcd(b, a % b);
        }

        // O(log(min(a,b))
        static long lcd(long a, long b){
            return a / gcd(a,b) * b;
        }
    //===============================================
    //===============================================

        void run(){
            /*try {
                Scanner in = new Scanner(Paths.get("skateboard.in"), "UTF-8");
                PrintWriter out = new PrintWriter("skateboard.out", "UTF-8");
                slove(in, out);
            }catch (IOException e){
                throw new Error(e);

            }
            */
            Scanner in = new Scanner(System.in);
            PrintWriter out = new PrintWriter(System.out);
            slove(in, out);
        }
        void  slove(Scanner in, PrintWriter out){
            int n = in.nextInt();
            boolean oneTask = false;
            int[] pro = new int[n];

            for(int i = 0; i < n; i++){
                pro[i] = in.nextInt();
            }

            Arrays.sort(pro);

            for(int i = n-1; i >= 0; i--){
                if(pro[i] >= 0){
                     oneTask = true;
                     out.print(pro[i]+ " ");
                     out.flush();
                }
                else if(pro[i] < 0){

                    if( (i+1) % 2 == 0 && i != 0){
                        for(int j = i; j>=0; j--){
                            oneTask = true;
                            out.print(pro[j]+ " ");
                            out.flush();
                        }
                        break;
                    }else if ( i % 2 == 0 && i != 0 && oneTask==true){
                            for(int j = i-1; j >= 0; j--){
                                out.print(pro[j]+ " ");
                                out.flush();
                            }
                        break;
                    }else if(i == 0 && oneTask == false){
                            oneTask = true;
                            out.print(pro[0]+ " ");
                            out.flush();
                    }
                    break;
                }

            }

        }
    //================================================
    //================================================
        public static void main(String[] args) {
            new JavaApplication1().run();
        }
    }


    import java.nio.file.Paths;
    import  java.util.*;
    import  java.io.*;
    public class JavaApplication1 {

    //================================================
    //================================================
        // O(long(n))
        static long binpow(long a, long n){
            if (n == 0) return 1;
            if (n % 2 == 1){
                return binpow(a, n-1) * a;
            }else {
                long b = binpow(a, n/2);
                return b * b;
            }
        }

        // O(log(min(a,b))
        static long gcd(long a, long b){
            if (b == 0) return a;
            else return gcd(b, a % b);
        }

        // O(log(min(a,b))
        static long lcd(long a, long b){
            return a / gcd(a,b) * b;
        }
    //===============================================
    //===============================================

        void run(){
            /*try {
                Scanner in = new Scanner(Paths.get("skateboard.in"), "UTF-8");
                PrintWriter out = new PrintWriter("skateboard.out", "UTF-8");
                slove(in, out);
            }catch (IOException e){
                throw new Error(e);

            }
            */
            Scanner in = new Scanner(System.in);
            PrintWriter out = new PrintWriter(System.out);
            slove(in, out);
        }
        void  slove(Scanner in, PrintWriter out){
            int n = in.nextInt();
            boolean oneTask = false;
            boolean hasZero = false;
            int[] pro = new int[n];

            for(int i = 0; i < n; i++){
                pro[i] = in.nextInt();
            }

            for(int i = 0; i < n; i++){
                if(pro[i] == 0){
                    hasZero = true;
                    for(int j = i;  j < n-1; j++){
                        pro[j] = pro[j+1];
                    }
                    i--;
                    n = n-1;
                }
            }

            Arrays.sort(pro, 0, n-1);

            for(int i = n-1; i >= 0; i--){
                if(pro[i] >= 0){
                     oneTask = true;
                     out.print(pro[i]+ " ");
                     out.flush();
                }
                else if(pro[i] < 0){
                    if((i+1) % 2 == 0 && i != 0){

                        for(int j = i; j>=0; j--){
                            oneTask = true;
                            out.print(pro[j]+ " ");
                            out.flush();
                        }
                        break;
                    }else if ( i % 2 == 0 && i != 0){

                            for(int j = i-1; j >= 0; j--){
                                out.print(pro[j]+ " ");
                                out.flush();
                            }
                        break;
                    }else if(i == 0 && oneTask == false){
                            if(hasZero){
                            out.print("0");
                            out.flush();
                            }else{
                            oneTask = true;
                            out.print(pro[0]+ " ");
                            out.flush();
                            }
                    }
                    break;
                }

            }

        }
    //================================================
    //================================================
        public static void main(String[] args) {
            new JavaApplication1().run();
        }
    }


import java.io.*;
import java.util.*;

public final class Template {
	public static void main(String[] args) {
		FastScanner sc = new FastScanner(System.in);

        int n = sc.nextInt();
        Integer points[] = new Integer[n];

        int negativeNos = 0;
        for (int i = 0; i < n; i++) {
            points[i] = sc.nextInt();
            if (points[i] < 0) negativeNos++;
        }

        if (n == 1) {
            System.out.println(points[0]);
            return;
        }

        Arrays.sort(points);

        int skip = -1;
        if (negativeNos % 2 == 1) skip = negativeNos-1;

        StringBuilder ans = new StringBuilder("");
        for (int i = 0; i < n; i++) {
            if (points[i] == 0 || i == skip) continue;
            ans.append("" + points[i] + " ");
        }

        if (ans.length() == 0)
            System.out.println("0");

        System.out.println(ans);
	}
}

 class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner(InputStream stream) {
            br = new BufferedReader(new InputStreamReader(stream));
        }

        public String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            }
            catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

        public int[] readArray(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++) a[i] = nextInt();
            return a;
        }
}


import java.util.*;

public class Main
{
	public static void main(String[] args)
	{

		Scanner s = new Scanner(System.in);
		int n = s.nextInt();

		int []neg,pos;
		neg = new int[101];
		pos = new int[101];

		int negC,posC,v;
		negC = posC = 0;

		for (int i = 1;i <= n;i++)
			if ((v = s.nextInt()) > 0)
			{
				pos[v]++;
				posC++;
			}
			else
			{
				neg[v * -1]++;
				negC++;
			}

		boolean flag = false;

		if (neg[0] != 0)
			flag = true;

		for (int i = 1;i <= 100;i++)
			if (pos[i] != 0)
				for (int j=1;j <= pos[i];j++)
					System.out.print(i + " ");

		if (n == 2 && negC == 2 && flag)
		{
			System.out.print(0);
			return;
		}
		else
		if (negC % 2 == 0 && negC!=2 && negC==n)
			negC -= 2;
		if(n!=1 && negC%2==1)
			negC--;

		for (int i=100;i >= 0;i--)
			if (negC != 0)
			{

				if (neg[i] != 0)
					for (int j = 1;j <= neg[i];j++)
					{
						System.out.print(i * -1 + " ");
						negC--;
					}

			}
			else
				break;

	}

}


import java.util.*;

public class Main
{
	public static void main(String[] args)
	{

		Scanner s = new Scanner(System.in);
		int n = s.nextInt();

		int []neg,pos;
		neg = new int[101];
		pos = new int[101];

		int negC,posC,v;
		negC = posC = 0;

		for (int i = 1;i <= n;i++)
			if ((v = s.nextInt()) > 0)
			{
				pos[v]++;
				posC++;
			}
			else
			{
				neg[v * -1]++;
				negC++;
			}

		boolean flag = false;

		if (neg[0] != 0)
			flag = true;

		for (int i = 1;i <= 100;i++)
			if (pos[i] != 0)
				for (int j=1;j <= pos[i];j++)
					System.out.print(i + " ");

		if (n == 1 && negC == 1)
			for (int i = 0;i < 101;i++)
				if (neg[i] != 0)
				{
					System.out.print(i * -1 + " ");
					break;
				}

		if (n == 2 && negC == 2 && flag)
			System.out.print(0);

		if (negC % 2 == 0)
			negC -= 2;
		else
			negC--;

		for (int i=100;i > 0;i--)
			if (negC != 0)
			{
				if (neg[i] != 0)
					for (int j = 1;j <= neg[i];j++)
					{
						System.out.print(i * -1 + " ");
						negC--;
					}

			}
			else
				break;

	}

}


import java.util.*;

public class Main
{
	public static void main(String[] args)
	{

		Scanner s = new Scanner(System.in);
		int n = s.nextInt();

		int []neg,pos;
		neg = new int[101];
		pos = new int[101];

		int negC,posC,v;
		negC = posC = 0;

		for (int i = 1;i <= n;i++)
			if ((v = s.nextInt()) > 0)
			{
				pos[v]++;
				posC++;
			}
			else
			{
				neg[v * -1]++;
				negC++;
			}

		boolean flag = false;

		if (neg[0] != 0)
			flag = true;

		for (int i = 1;i <= 100;i++)
			if (pos[i] != 0)
				for (int j=1;j <= pos[i];j++)
					System.out.print(i + " ");

		if (n == 1 && negC == 1)
			for (int i = 0;i < 101;i++)
				if (neg[i] != 0)
				{
					System.out.print(i * -1 + " ");
					break;
				}

		if (n == 2 && negC == 2 && flag)
		{
			System.out.print(0);
			return;
		}

		if (negC % 2 == 0 && negC!=2)
			negC -= 2;
		else
			if(negC%2==1 && negC!=1)
			negC--;

		for (int i=100;i > 0;i--)
			if (negC != 0)
			{
				if (neg[i] != 0)
					for (int j = 1;j <= neg[i];j++)
					{
						System.out.print(i * -1 + " ");
						negC--;
					}

			}
			else
				break;

	}

}


import java.util.*;

public class Main
{
	public static void main(String[] args)
	{

		Scanner s = new Scanner(System.in);
		int n = s.nextInt();

		int []neg,pos;
		neg = new int[101];
		pos = new int[101];

		int negC,posC,v;
		negC = posC = 0;

		for (int i = 1;i <= n;i++)
			if ((v = s.nextInt()) > 0)
			{
				pos[v]++;
				posC++;
			}
			else
			{
				neg[v * -1]++;
				negC++;
			}

		boolean flag = false;

		if (neg[0] != 0)
			flag = true;

		for (int i = 1;i <= 100;i++)
			if (pos[i] != 0)
				for (int j=1;j <= pos[i];j++)
					System.out.print(i + " ");

		if (flag)
		{

			if( negC == neg[0]-1 || negC==neg[0] )
			{
				System.out.println(0);
				return;
			}

			negC -= neg[0];

		}

		if (n != 1 && negC % 2 == 1)
			negC--;

		for (int i=100;i >= 0;i--)
			if (negC != 0)
			{

				if (neg[i] != 0)
					for (int j = 1;j <= neg[i];j++)
					{
						System.out.print(i * -1 + " ");
						negC--;
					}

			}
			else
				break;

	}

}


import java.util.*;

public class Main
{
	public static void main(String[] args)
	{

		Scanner s = new Scanner(System.in);
		int n = s.nextInt();

		int []neg,pos;
		neg = new int[101];
		pos = new int[101];

		int negC,posC,v;
		negC = posC = 0;

		for (int i = 1;i <= n;i++)
			if ((v = s.nextInt()) > 0)
			{
				pos[v]++;
				posC++;
			}
			else
			{
				neg[v * -1]++;
				negC++;
			}

		boolean flag = false;

		if (neg[0] != 0)
			flag = true;

		for (int i = 1;i <= 100;i++)
			if (pos[i] != 0)
				for (int j=1;j <= pos[i];j++)
					System.out.print(i + " ");

		if (n == 2 && negC == 2 && flag)
		{
			System.out.print(0);
			return;
		}
		else
		if (negC % 2 == 0 && negC!=2)
			negC -= 2;
		else
		if(n!=1 && negC%2==1)
			negC--;

		for (int i=100;i >= 0;i--)
			if (negC != 0)
			{

				if (neg[i] != 0)
					for (int j = 1;j <= neg[i];j++)
					{
						System.out.print(i * -1 + " ");
						negC--;
					}

			}
			else
				break;

	}

}


import java.util.*;

public class Main
{
	public static void main(String[] args)
	{

		Scanner s = new Scanner(System.in);
		int n = s.nextInt();

		int []neg,pos;
		neg = new int[101];
		pos = new int[101];

		int negC,posC,v;
		negC = posC = 0;

		for (int i = 1;i <= n;i++)
			if ((v = s.nextInt()) > 0)
			{
				pos[v]++;
				posC++;
			}
			else
			{
				neg[v * -1]++;
				negC++;
			}

		boolean flag = false;

		if (neg[0] != 0)
			flag = true;

		for (int i = 1;i <= 100;i++)
			if (pos[i] != 0)
				for (int j=1;j <= pos[i];j++)
					System.out.print(i + " ");

		if (n == 1 && negC == 1)
			for (int i = 0;i < 101;i++)
				if (neg[i] != 0)
				{
					System.out.print(i * -1 + " ");
					break;
				}

		if (n == 2 && negC == 2 && flag)
		{
			System.out.print(0);
			return;
		}

		if (negC % 2 == 0 && negC!=2)
			negC -= 2;

		if(n!=1 && negC%2==1)
			negC--;

		if(negC%2==1 && negC!=n)
			negC--;

		for (int i=100;i > 0;i--)
			if (negC != 0)
			{
				if (neg[i] != 0)
					for (int j = 1;j <= neg[i];j++)
					{
						System.out.print(i * -1 + " ");
						negC--;
					}

			}
			else
				break;

	}

}


import java.util.*;

public class Main
{
	public static void main(String[] args)
	{

		Scanner s = new Scanner(System.in);
		int n = s.nextInt();

		int []neg,pos;
		neg = new int[101];
		pos = new int[101];

		int negC,posC,v;
		negC = posC = 0;

		for (int i = 1;i <= n;i++)
			if ((v = s.nextInt()) > 0)
			{
				pos[v]++;
				posC++;
			}
			else
			{
				neg[v * -1]++;
				negC++;
			}

		boolean flag = false;

		if (neg[0] != 0)
			flag = true;

		for (int i = 1;i <= 100;i++)
			if (pos[i] != 0)
				for (int j=1;j <= pos[i];j++)
					System.out.print(i + " ");

		if (flag)
		{

			if( (neg[0]==negC-1 || neg[0]==negC)  && negC==n )
			{
				System.out.println(0);
				return;
			}

			negC -= neg[0];

		}

		if (n != 1 && negC % 2 == 1)
			negC--;

		for (int i=100;i >= 0;i--)
			if (negC != 0)
			{

				if (neg[i] != 0)
					for (int j = 1;j <= neg[i];j++)
					{
						System.out.print(i * -1 + " ");
						negC--;

						if(negC==0)
							break;

					}

			}
			else
				break;

	}

}


import java.util.*;

public class Main
{
	public static void main(String[] args)
	{

		Scanner s = new Scanner(System.in);
		int n = s.nextInt();

		int []neg,pos;
		neg = new int[101];
		pos = new int[101];

		int negC,posC,v;
		negC = posC = 0;

		for (int i = 1;i <= n;i++)
			if ((v = s.nextInt()) > 0)
			{
				pos[v]++;
				posC++;
			}
			else
			{
				neg[v * -1]++;
				negC++;
			}

		boolean flag = false;

		if (neg[0] != 0)
			flag = true;

		for (int i = 1;i <= 100;i++)
			if (pos[i] != 0)
				for (int j=1;j <= pos[i];j++)
					System.out.print(i + " ");

		if (n == 2 && negC == 2 && flag)
		{
			System.out.print(0);
			return;
		}
		else
		if (negC % 2 == 0 && negC==2 && flag && negC!=n)
			negC -= 2;
		if(n!=1 && negC%2==1)
			negC--;

		for (int i=100;i >= 0;i--)
			if (negC != 0)
			{

				if (neg[i] != 0)
					for (int j = 1;j <= neg[i];j++)
					{
						System.out.print(i * -1 + " ");
						negC--;
					}

			}
			else
				break;

	}

}


import java.util.*;

public class Main
{
	public static void main(String[] args)
	{

		Scanner s = new Scanner(System.in);
		int n = s.nextInt();

		int []neg,pos;
		neg = new int[101];
		pos = new int[101];

		int negC,posC,v;
		negC = posC = 0;

		for (int i = 1;i <= n;i++)
			if ((v = s.nextInt()) > 0)
			{
				pos[v]++;
				posC++;
			}
			else
			{
				neg[v * -1]++;
				negC++;
			}

		boolean flag = false;

		if (neg[0] != 0)
			flag = true;

		for (int i = 1;i <= 100;i++)
			if (pos[i] != 0)
				for (int j=1;j <= pos[i];j++)
					System.out.print(i + " ");

		if (n == 2 && negC == 2 && flag)
		{
			System.out.print(0);
			return;
		}
		else
		if (negC % 2 == 0 && negC!=2)
			negC -= 2;
		else
		if(n!=1 && negC%2==1)
			negC--;

		for (int i=100;i > 0;i--)
			if (negC != 0)
			{

				if (neg[i] != 0)
					for (int j = 1;j <= neg[i];j++)
					{
						System.out.print(i * -1 + " ");
						negC--;
					}

			}
			else
				break;

	}

}


import java.util.*;

public class Main
{
	public static void main(String[] args)
	{

		Scanner s = new Scanner(System.in);
		int n = s.nextInt();

		int []neg,pos;
		neg = new int[101];
		pos = new int[101];

		int negC,posC,v;
		negC = posC = 0;

		for (int i = 1;i <= n;i++)
			if ((v = s.nextInt()) > 0)
			{
				pos[v]++;
				posC++;
			}
			else
			{
				neg[v * -1]++;
				negC++;
			}

		boolean flag = false;

		if (neg[0] != 0)
			flag = true;

		for (int i = 1;i <= 100;i++)
			if (pos[i] != 0)
				for (int j=1;j <= pos[i];j++)
					System.out.print(i + " ");

		if (flag)
		{

			if( (neg[0]==negC-1 || neg[0]==negC)  && negC==n )
			{
				System.out.println(0);
				return;
			}

			negC -= neg[0];

		}

		if (n != 1 && negC % 2 == 1)
			negC--;

		for (int i=100;i >= 0;i--)
			if (negC != 0)
			{

				if (neg[i] != 0)
					for (int j = 1;j <= neg[i];j++)
					{
						System.out.print(i * -1 + " ");
						negC--;
					}

			}
			else
				break;

	}

}


import java.util.*;

public class Main
{
	public static void main(String[] args)
	{

		Scanner s = new Scanner(System.in);
		int n = s.nextInt();

		int []neg,pos;
		neg = new int[101];
		pos = new int[101];

		int negC,posC,v;
		negC = posC = 0;

		for (int i = 1;i <= n;i++)
			if ((v = s.nextInt()) > 0)
			{
				pos[v]++;
				posC++;
			}
			else
			{
				neg[v * -1]++;
				negC++;
			}

		boolean flag = false;

		if (neg[0] != 0)
			flag = true;

		for (int i = 1;i <= 100;i++)
			if (pos[i] != 0)
				for (int j=1;j <= pos[i];j++)
					System.out.print(i + " ");

		if (n == 1 && negC == 1)
			for (int i = 0;i < 101;i++)
				if (neg[i] != 0)
				{
					System.out.print(i * -1 + " ");
					break;
				}

		if (n == 2 && negC == 2 && flag)
		{
			System.out.print(0);
			return;
		}

		if (negC % 2 == 0 && negC!=2)
			negC -= 2;
		else
			negC--;

		for (int i=100;i > 0;i--)
			if (negC != 0)
			{
				if (neg[i] != 0)
					for (int j = 1;j <= neg[i];j++)
					{
						System.out.print(i * -1 + " ");
						negC--;
					}

			}
			else
				break;

	}

}


import java.util.*;

public class Main
{
	public static void main(String[] args)
	{

		Scanner s = new Scanner(System.in);
		int n = s.nextInt();

		int []neg,pos;
		neg = new int[101];
		pos = new int[101];

		int negC,posC,v;
		negC = posC = 0;

		for (int i = 1;i <= n;i++)
			if ((v = s.nextInt()) > 0)
			{
				pos[v]++;
				posC++;
			}
			else
			{
				neg[v * -1]++;
				negC++;
			}

		boolean flag = false;

		if (neg[0] != 0)
			flag = true;

		for (int i = 1;i <= 100;i++)
			if (pos[i] != 0)
				for (int j=1;j <= pos[i];j++)
					System.out.print(i + " ");

		if (flag)
		{

			if( (negC == neg[0]-1 || negC==neg[0]) && posC==0 )
			{
				System.out.println(0);
				return;
			}

			negC -= neg[0];

		}

		if (n != 1 && negC % 2 == 1)
			negC--;

		for (int i=100;i >= 0;i--)
			if (negC != 0)
			{

				if (neg[i] != 0)
					for (int j = 1;j <= neg[i];j++)
					{
						System.out.print(i * -1 + " ");
						negC--;
					}

			}
			else
				break;

	}

}


import java.util.*;
import java.io.*;

public class CF {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(new OutputStreamWriter(System.out));

        ArrayList<Integer> negatives = new ArrayList<>();

        boolean zero = false;
        int n = Integer.parseInt(br.readLine());

        StringTokenizer st = new StringTokenizer(br.readLine());
        for (int i = 0; i < n; i++) {
            int c = Integer.parseInt(st.nextToken());
            if (c < 0) negatives.add(c);
            else if (c > 0) pw.print(c + " ");
            else zero = true;
        }

        if (n == 1) { // zero case
            if (negatives.size() == 1) {
                pw.println(negatives.get(0));
            } else if (zero) {
                pw.println(0);
            }
        } else if (n == 2 && zero && negatives.size() == 1) {
            pw.println(0 + " " + negatives.get(0));
        } else {
            Collections.sort(negatives);
            int numNegs = negatives.size();
            if (numNegs % 2 == 1) numNegs -= 1;

            for (int i = 0; i < numNegs; i++) {
                pw.print(negatives.get(i) + " ");
            }
            pw.println();
        }

        pw.close();
    }
}


import java.util.*;
import java.io.*;

public class CF {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(new OutputStreamWriter(System.out));

        ArrayList<Integer> negatives = new ArrayList<>();

        boolean zero = false;
        int n = Integer.parseInt(br.readLine());

        StringTokenizer st = new StringTokenizer(br.readLine());
        for (int i = 0; i < n; i++) {
            int c = Integer.parseInt(st.nextToken());
            if (c < 0) negatives.add(c);
            else if (c > 0) pw.print(c + " ");
            else zero = true;
        }

        if (n == 1 && negatives.size() == 1) { // zero case
            pw.println(negatives.get(0));
        } else if (n == 2 && zero && negatives.size() == 1) {
            pw.println(0 + " " + negatives.get(0));
        } else {
            Collections.sort(negatives);
            int numNegs = negatives.size();
            if (numNegs % 2 == 1) numNegs -= 1;

            for (int i = 0; i < numNegs; i++) {
                pw.print(negatives.get(i) + " ");
            }
            pw.println();
        }

        pw.close();
    }
}


import java.util.*;
import java.io.*;

public class CF {
    public static void main(String[] args) throws IOException {
        //BufferedReader br = new BufferedReader(new FileReader("input.txt"));
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(new OutputStreamWriter(System.out));

        ArrayList<Integer> negatives = new ArrayList<>();
        int posCount = 0;

        boolean zero = false;
        int n = Integer.parseInt(br.readLine());

        StringTokenizer st = new StringTokenizer(br.readLine());
        for (int i = 0; i < n; i++) {
            int c = Integer.parseInt(st.nextToken());
            if (c < 0) negatives.add(c);
            else if (c > 0) {
                pw.print(c + " ");
                posCount++;
            }
            else zero = true;
        }

        if (n == 1) { // zero case
            if (negatives.size() == 1) {
                pw.println(negatives.get(0));
            } else if (zero) {
                pw.println(0);
            }
        } else if (negatives.size() == 0) {
            if (posCount == 0) {
                pw.println(0);
            }
        } else if (n == 2 && zero && negatives.size() == 1) {
            pw.println(0 + " " + negatives.get(0));
        } else {
            Collections.sort(negatives);
            int numNegs = negatives.size();
            if (numNegs % 2 == 1) numNegs -= 1;

            for (int i = 0; i < numNegs; i++) {
                pw.print(negatives.get(i) + " ");
            }
            pw.println();
        }

        pw.close();
    }
}


import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

public class TCMCFplus {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		ArrayList<Integer> negative = new ArrayList<>();
		for(int i = 0 ; i < n ; i++){
			int a = scan.nextInt();
			if(a < 0) negative.add(a);
			if(a > 0) System.out.print(a + " ");
		}
		Collections.sort(negative);
		for(int i = 0 ; i < negative.size() ; i+=2){
			if(negative.size()-i > 1){
				System.out.print(negative.get(i) + " " + negative.get(i+1) + " ");
			}
		}

	}
}


import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

public class TCMCFplus {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt(), zero = 0, pos = 0;
		ArrayList<Integer> negative = new ArrayList<>();
		for(int i = 0 ; i < n ; i++){
			int a = scan.nextInt();
			if(a < 0) negative.add(a);
			if(a > 0){
				System.out.print(a + " ");
				pos++;
			} if(a == 0) zero++;
			if(n == 1){
				System.out.println(a);
				return;
			}
		}
		Collections.sort(negative);
		if(negative.size() == 1 && pos == 0){
			if(zero > 0) System.out.print(0);
			else System.out.println(negative.get(0));
		} else {
			for(int i = 0 ; i < negative.size() ; i+=2){
				if(negative.size()-i > 1){
					System.out.print(negative.get(i) + " " + negative.get(i+1) + " ");
				}
			}
		}
	}
}


import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

public class TCMCFplus {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt(), zero = 0;
		ArrayList<Integer> negative = new ArrayList<>();
		for(int i = 0 ; i < n ; i++){
			int a = scan.nextInt();
			if(a < 0) negative.add(a);
			if(a > 0) System.out.print(a + " ");
			if(a == 0) zero++;
		}
		Collections.sort(negative);
		if(negative.size() == 1){
			if(zero > 0) System.out.print(0);
			else System.out.println(negative.get(0));
		} else {
			for(int i = 0 ; i < negative.size() ; i+=2){
				if(negative.size()-i > 1){
					System.out.print(negative.get(i) + " " + negative.get(i+1) + " ");
				}
			}
		}
	}
}


import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

public class TCMCFplus {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt(), zero = 0, pos = 0;
		ArrayList<Integer> negative = new ArrayList<>();
		for(int i = 0 ; i < n ; i++){
			int a = scan.nextInt();
			if(a < 0) negative.add(a);
			if(a > 0){
				System.out.print(a + " ");
				pos++;
			} if(a == 0) zero++;
		}
		Collections.sort(negative);
		if(negative.size() == 1 && pos == 0){
			if(zero > 0) System.out.print(0);
			else System.out.println(negative.get(0));
		} else {
			for(int i = 0 ; i < negative.size() ; i+=2){
				if(negative.size()-i > 1){
					System.out.print(negative.get(i) + " " + negative.get(i+1) + " ");
				}
			}
		}
	}
}


import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

public class TCMCFplus {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt(), zero = 0, pos = 0;
		ArrayList<Integer> negative = new ArrayList<>();
		for(int i = 0 ; i < n ; i++){
			int a = scan.nextInt();
			if(n == 1){
				System.out.println(a);
				return;
			} if(a < 0) negative.add(a);
			if(a > 0){
				System.out.print(a + " ");
				pos++;
			} if(a == 0) zero++;
		}
		Collections.sort(negative);
		if(pos == 0 && negative.size() == 0) System.out.println(0);
		if(negative.size() == 1 && pos == 0){
			if(zero > 0) System.out.print(0);
			else System.out.println(negative.get(0));
		} else {
			for(int i = 0 ; i < negative.size() ; i+=2){
				if(negative.size()-i > 1){
					System.out.print(negative.get(i) + " " + negative.get(i+1) + " ");
				}
			}
		}
	}
}


import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

public class TCMCFplus {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt(), zero = 0, pos = 0;
		ArrayList<Integer> negative = new ArrayList<>();
		for(int i = 0 ; i < n ; i++){
			int a = scan.nextInt();
			if(n == 1){
				System.out.println(a);
				return;
			} if(a < 0) negative.add(a);
			if(a > 0){
				System.out.print(a + " ");
				pos++;
			} if(a == 0) zero++;
		}
		Collections.sort(negative);
		if(negative.size() == 1 && pos == 0){
			if(zero > 0) System.out.print(0);
			else System.out.println(negative.get(0));
		} else {
			for(int i = 0 ; i < negative.size() ; i+=2){
				if(negative.size()-i > 1){
					System.out.print(negative.get(i) + " " + negative.get(i+1) + " ");
				}
			}
		}
	}
}


import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

public class TCMCFplus {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		ArrayList<Integer> negative = new ArrayList<>();
		for(int i = 0 ; i < n ; i++){
			int a = scan.nextInt();
			if(a < 0) negative.add(a);
			if(a > 0 || n == 1) System.out.print(a + " ");
		}
		Collections.sort(negative);
		for(int i = 0 ; i < negative.size() ; i+=2){
			if(negative.size()-i > 1){
				System.out.print(negative.get(i) + " " + negative.get(i+1) + " ");
			}
		}
	}
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 *
 * @author Quan2202
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);

        int n = in.nextInt();
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = in.nextInt();
        }
        sort(a);
        int count = 0;
        int begin = -1;
        int end = -1;

        for (int i = 0; i < n; i++) {
            if (a[i] < 0) {
                count++;
            } else if (a[i] == 0) {
                if (begin == -1) {
                    begin = i;
                    end = i;
                } else {
                    end = i;
                }
            } else {
                break;
            }
        }

        int i = 0;
        if (count % 2 == 1 && n > 1) {
            i = 1;
        }

        if (begin >= 0 && end >= 0) {
            if (begin == 0 && end == n - 1) {
                for (int j = begin; j < n; j++) {
                    out.println(a[i] + " ");
                }
            } else {
                if (begin == 1) {
                    if (end == n - 1) {
                        for (; i < n; i++) {
                            out.print(a[i] + " ");
                        }
                    } else {
                        for (i=end+1; i < n; i++) {
                            out.print(a[i] + " ");
                        }
                    }

                }
                for (; i < n; i++) {
                    if (begin > i || i > end) {
                        out.print(a[i] + " ");
                    }
                }
            }

        } else {
            for (; i < n; i++) {
                out.print(a[i] + " ");
            }
        }
        out.flush();
    }

    static void sort(int arr[]) {
        int n = arr.length;

        // Build heap (rearrange array)
        for (int i = n / 2 - 1; i >= 0; i--) {
            heapify(arr, n, i);
        }

        // One by one extract an element from heap
        for (int i = n - 1; i >= 0; i--) {
            // Move current root to end
            int temp = arr[0];
            arr[0] = arr[i];
            arr[i] = temp;

            // call max heapify on the reduced heap
            heapify(arr, i, 0);
        }
    }

    // To heapify a subtree rooted with node i which is
    // an index in arr[]. n is size of heap
    static void heapify(int arr[], int n, int i) {
        int largest = i; // Initialize largest as root
        int l = 2 * i + 1; // left = 2*i + 1
        int r = 2 * i + 2; // right = 2*i + 2

        // If left child is larger than root
        if (l < n && arr[l] > arr[largest]) {
            largest = l;
        }

        // If right child is larger than largest so far
        if (r < n && arr[r] > arr[largest]) {
            largest = r;
        }

        // If largest is not root
        if (largest != i) {
            int swap = arr[i];
            arr[i] = arr[largest];
            arr[largest] = swap;

            // Recursively heapify the affected sub-tree
            heapify(arr, n, largest);
        }
    }

    static class InputReader {

        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 *
 * @author Quan2202
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);

        int n = in.nextInt();
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = in.nextInt();
        }
        sort(a);
        int count = 0;
        int begin = -1;
        int end = -1;

        for (int i = 0; i < n; i++) {
            if (a[i] < 0) {
                count++;
            } else if (a[i] == 0) {
                if (begin == -1) {
                    begin = i;
                    end = i;
                } else {
                    end = i;
                }
            } else {
                break;
            }
        }

        int i = 0;
        if (count % 2 == 1 && n > 1) {
            i = 1;
        }

        if (begin >= 0 && end >= 0) {
            if (begin == 0 && end == n - 1) {
                for (int j = begin; j < n; j++) {
                    out.println(a[i] + " ");
                }
            } else {
                for (; i < n; i++) {
                    if (begin > i || i > end) {
                        out.print(a[i] + " ");
                    }
                }
            }

        } else {
            for (; i < n; i++) {
                out.print(a[i] + " ");
            }
        }
        out.flush();
    }

    static void sort(int arr[]) {
        int n = arr.length;

        // Build heap (rearrange array)
        for (int i = n / 2 - 1; i >= 0; i--) {
            heapify(arr, n, i);
        }

        // One by one extract an element from heap
        for (int i = n - 1; i >= 0; i--) {
            // Move current root to end
            int temp = arr[0];
            arr[0] = arr[i];
            arr[i] = temp;

            // call max heapify on the reduced heap
            heapify(arr, i, 0);
        }
    }

    // To heapify a subtree rooted with node i which is
    // an index in arr[]. n is size of heap
    static void heapify(int arr[], int n, int i) {
        int largest = i; // Initialize largest as root
        int l = 2 * i + 1; // left = 2*i + 1
        int r = 2 * i + 2; // right = 2*i + 2

        // If left child is larger than root
        if (l < n && arr[l] > arr[largest]) {
            largest = l;
        }

        // If right child is larger than largest so far
        if (r < n && arr[r] > arr[largest]) {
            largest = r;
        }

        // If largest is not root
        if (largest != i) {
            int swap = arr[i];
            arr[i] = arr[largest];
            arr[largest] = swap;

            // Recursively heapify the affected sub-tree
            heapify(arr, n, largest);
        }
    }

    static class InputReader {

        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 *
 * @author Quan2202
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);

        int n = in.nextInt();
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = in.nextInt();
        }
        sort(a);
        int count = 0;
        int begin = -1;
        int end = -1;

        for (int i = 0; i < n; i++) {
            if (a[i] < 0) {
                count++;
            } else if (a[i] == 0) {
                if (begin == -1) {
                    begin = i;
                    end = i;
                } else {
                    end = i;
                }
            } else {
                break;
            }
        }

        int i = 0;
        if (count % 2 == 1 && n > 1) {
            i = 1;
        }

        if (begin >= 0 && end >= 0) {
            if (begin == 0 && end == n - 1) {
                for (int j = begin; j < n; j++) {
                    out.println(a[i] + " ");
                }
            } else {
                if (begin == 1) {
                    for (; i < n; i++) {
                        out.print(a[i] + " ");
                    }
                }
                for (; i < n; i++) {
                    if (begin > i || i > end) {
                        out.print(a[i] + " ");
                    }
                }
            }

        } else {
            for (; i < n; i++) {
                out.print(a[i] + " ");
            }
        }
        out.flush();
    }

    static void sort(int arr[]) {
        int n = arr.length;

        // Build heap (rearrange array)
        for (int i = n / 2 - 1; i >= 0; i--) {
            heapify(arr, n, i);
        }

        // One by one extract an element from heap
        for (int i = n - 1; i >= 0; i--) {
            // Move current root to end
            int temp = arr[0];
            arr[0] = arr[i];
            arr[i] = temp;

            // call max heapify on the reduced heap
            heapify(arr, i, 0);
        }
    }

    // To heapify a subtree rooted with node i which is
    // an index in arr[]. n is size of heap
    static void heapify(int arr[], int n, int i) {
        int largest = i; // Initialize largest as root
        int l = 2 * i + 1; // left = 2*i + 1
        int r = 2 * i + 2; // right = 2*i + 2

        // If left child is larger than root
        if (l < n && arr[l] > arr[largest]) {
            largest = l;
        }

        // If right child is larger than largest so far
        if (r < n && arr[r] > arr[largest]) {
            largest = r;
        }

        // If largest is not root
        if (largest != i) {
            int swap = arr[i];
            arr[i] = arr[largest];
            arr[largest] = swap;

            // Recursively heapify the affected sub-tree
            heapify(arr, n, largest);
        }
    }

    static class InputReader {

        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 *
 * @author Quan2202
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);

        int n = in.nextInt();
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = in.nextInt();
        }
        sort(a);
        int count = 0;
        long re = 1;
        int begin = -1;
        int end = -1;
        for (int i = 0; i < n; i++) {
            if (a[i] < 0) {
                count++;
            } else if (a[i] == 0) {
                if (begin == -1) {
                    begin = i;
                    end = i;
                } else {
                    end = i;
                }
            } else {
                break;
            }
        }
        int i = 0;
        if (count % 2 == 1 && n > 1) {
            i = 1;
        }
        //out.println(begin+" "+end);
        if (begin >= 0 && end >= 0) {
            if (end == n - 1) {
                for (int j = begin; j < n; j++) {
                    out.println(a[i] + " ");
                }
            } else {
                for (; i < n; i++) {
                    if (begin > i && i > end) {
                        out.print(a[i] + " ");
                    }
                }
            }

        } else {
            for (; i < n; i++) {
                out.print(a[i] + " ");
            }
        }
        out.flush();
    }

    static void sort(int arr[]) {
        int n = arr.length;

        // Build heap (rearrange array)
        for (int i = n / 2 - 1; i >= 0; i--) {
            heapify(arr, n, i);
        }

        // One by one extract an element from heap
        for (int i = n - 1; i >= 0; i--) {
            // Move current root to end
            int temp = arr[0];
            arr[0] = arr[i];
            arr[i] = temp;

            // call max heapify on the reduced heap
            heapify(arr, i, 0);
        }
    }

    // To heapify a subtree rooted with node i which is
    // an index in arr[]. n is size of heap
    static void heapify(int arr[], int n, int i) {
        int largest = i; // Initialize largest as root
        int l = 2 * i + 1; // left = 2*i + 1
        int r = 2 * i + 2; // right = 2*i + 2

        // If left child is larger than root
        if (l < n && arr[l] > arr[largest]) {
            largest = l;
        }

        // If right child is larger than largest so far
        if (r < n && arr[r] > arr[largest]) {
            largest = r;
        }

        // If largest is not root
        if (largest != i) {
            int swap = arr[i];
            arr[i] = arr[largest];
            arr[largest] = swap;

            // Recursively heapify the affected sub-tree
            heapify(arr, n, largest);
        }
    }

    static class InputReader {

        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 *
 * @author Quan2202
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);

        int n = in.nextInt();
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = in.nextInt();
        }
        sort(a);
        int count = 0;
        long re = 1;
        int begin = -1;
        int end = -1;
        for (int i = 0; i < n; i++) {
            if (a[i] < 0) {
                count++;
            } else if (a[i] == 0) {
                if (begin == -1) {
                    begin = i;
                    end = i;
                } else {
                    end = i;
                }
            } else {
                break;
            }
        }
        int i = 0;
        if (count % 2 == 1) {
            i = 1;
        }
        //out.println(begin+" "+end);
        if (begin >= 0 && end >= 0) {
            for (; i < n; i++) {
                if (begin <= i && i <= end) {
                    out.print(a[i] + " ");
                }
            }
        } else {
            for (; i < n; i++) {
                out.print(a[i] + " ");
            }
        }
        out.flush();
    }

    static void sort(int arr[]) {
        int n = arr.length;

        // Build heap (rearrange array)
        for (int i = n / 2 - 1; i >= 0; i--) {
            heapify(arr, n, i);
        }

        // One by one extract an element from heap
        for (int i = n - 1; i >= 0; i--) {
            // Move current root to end
            int temp = arr[0];
            arr[0] = arr[i];
            arr[i] = temp;

            // call max heapify on the reduced heap
            heapify(arr, i, 0);
        }
    }

    // To heapify a subtree rooted with node i which is
    // an index in arr[]. n is size of heap
    static void heapify(int arr[], int n, int i) {
        int largest = i; // Initialize largest as root
        int l = 2 * i + 1; // left = 2*i + 1
        int r = 2 * i + 2; // right = 2*i + 2

        // If left child is larger than root
        if (l < n && arr[l] > arr[largest]) {
            largest = l;
        }

        // If right child is larger than largest so far
        if (r < n && arr[r] > arr[largest]) {
            largest = r;
        }

        // If largest is not root
        if (largest != i) {
            int swap = arr[i];
            arr[i] = arr[largest];
            arr[largest] = swap;

            // Recursively heapify the affected sub-tree
            heapify(arr, n, largest);
        }
    }

    static class InputReader {

        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }
    }
}