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;
        int index = -1;

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

        if (n == 1) {
            out.println(a[0]);
        } else {
            if (index >= 0) {
                for (int i = 0; i < index; i++) {
                    out.print(a[i] + " ");
                }
                if (count % 2 == 0) {
                    out.print(a[index]);
                }
            }

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

            for (int i = Math.max(index + 1, end + 1); 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;
        int index = -1;

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

        if (n == 1) {
            out.println(a[0]);
        } else {
            if (index >= 0) {
                for (int i = 0; i < index; i++) {
                    out.print(a[i] + " ");
                }
                if (count % 2 == 0) {
                    out.print(a[index] + " ");
                }
            }

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

            for (int i = Math.max(index + 1, end + 1); 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 (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.util.*;
import java.util.function.ToIntFunction;

public class I {

    public static void main(String[] args) {
        new I().begin();
    }

    private void begin() {
        Scanner scanner = new Scanner(System.in);

        int n = scanner.nextInt();

        List<Integer> inputs = new ArrayList<>();

        for (int i = 0; i < n; i++) {
            inputs.add(scanner.nextInt());
        }
        List<Integer> icopy = new ArrayList<>(inputs);
        inputs.sort(Comparator.comparingInt(integer -> integer));

        inputs.removeIf(integer -> integer == 0);
        for (int i = 0; i < inputs.size(); i++) {
            if(inputs.get(i) > 0 && i % 2 == 1){
                inputs.remove(i - 1);
                break;
            }
        }

        if(inputs.isEmpty()){
            icopy.removeIf(i -> i ==0);
            if(icopy.isEmpty()){
                System.out.print(0);
                return;
            }
            for (Integer integer : icopy) {
                System.out.print(integer + " ");
            }
        }
        for (Integer integer : inputs) {
            System.out.print(integer + " ");
        }

    }

}


import java.util.*;
import java.util.function.ToIntFunction;

public class I {

    public static void main(String[] args) {
        new I().begin();
    }

    private void begin() {
        Scanner scanner = new Scanner(System.in);

        int n = scanner.nextInt();

        List<Integer> inputs = new ArrayList<>();

        for (int i = 0; i < n; i++) {
            inputs.add(scanner.nextInt());
        }
        List<Integer> icopy = new ArrayList<>(inputs);
        inputs.sort(Comparator.comparingInt(integer -> integer));

        inputs.removeIf(integer -> integer == 0);
        for (int i = 0; i < inputs.size(); i++) {
            if(inputs.get(i) > 0){
                if(i % 2 == 1) inputs.remove(i - 1);
                break;
            }
        }

        if(inputs.isEmpty()){
            icopy.removeIf(i -> i ==0);
            if(icopy.isEmpty()){
                System.out.print(0);
                return;
            }
            for (Integer integer : icopy) {
                System.out.print(integer + " ");
            }
        }
        for (Integer integer : inputs) {
            System.out.print(integer + " ");
        }

    }

}


import java.util.*;
import java.util.function.ToIntFunction;

public class I {

    public static void main(String[] args) {
        new I().begin();
    }

    private void begin() {
        Scanner scanner = new Scanner(System.in);

        int n = scanner.nextInt();

        List<Integer> inputs = new ArrayList<>();

        for (int i = 0; i < n; i++) {
            inputs.add(scanner.nextInt());
        }
        List<Integer> icopy = new ArrayList<>(inputs);
        inputs.sort(Comparator.comparingInt(integer -> integer));

        for (int i = 0; i < inputs.size(); i++) {
            if(inputs.get(i) > 0) break;
            if(inputs.get(i) == 0 && i % 2 == 1){
                inputs.remove(i - 1);
                break;
            }
        }
        inputs.removeIf(integer -> integer == 0);
        if(inputs.isEmpty()){
            icopy.removeIf(i -> i ==0);
            if(icopy.isEmpty()){
                System.out.print(0);
                return;
            }
            for (Integer integer : icopy) {
                System.out.print(integer + " ");
            }
        }
        for (Integer integer : inputs) {
            System.out.print(integer + " ");
        }

    }

}


import java.util.*;
import java.util.function.ToIntFunction;

public class I {

    public static void main(String[] args) {
        new I().begin();
    }

    private void begin() {
        Scanner scanner = new Scanner(System.in);

        int n = scanner.nextInt();

        List<Integer> inputs = new ArrayList<>();

        if(n == 1){
            System.out.print(scanner.nextInt());
            return;
        }
        for (int i = 0; i < n; i++) {
            inputs.add(scanner.nextInt());
        }

        inputs.sort(Comparator.comparingInt(integer -> integer));

        inputs.removeIf(integer -> integer == 0);
        for (int i = 0; i < inputs.size(); i++) {
            if(inputs.get(i) > 0){
                if(i % 2 == 1) inputs.remove(i - 1);
                break;
            }
        }

        if(inputs.isEmpty()){
            System.out.print(0);
            return;
        }
        if(inputs.size() == 1){
            if(inputs.get(0) < 0) System.out.print(0);
            else System.out.print(inputs.get(0));
            return;
        }
        for (Integer integer : inputs) {
            System.out.print(integer + " ");
        }

    }

}


import java.util.*;
import java.util.function.ToIntFunction;

public class I {

    public static void main(String[] args) {
        new I().begin();
    }

    private void begin() {
        Scanner scanner = new Scanner(System.in);

        int n = scanner.nextInt();

        List<Integer> inputs = new ArrayList<>();

        if(n == 1){
            System.out.print(scanner.nextInt());
            return;
        }
        for (int i = 0; i < n; i++) {
            inputs.add(scanner.nextInt());
        }

        inputs.sort(Comparator.comparingInt(integer -> integer));

        inputs.removeIf(integer -> integer == 0);
        for (int i = 0; i < inputs.size(); i++) {
            if(inputs.get(i) > 0){
                if(i % 2 == 1) inputs.remove(i - 1);
                break;
            }
        }

        if(inputs.isEmpty()){
            System.out.print(0);
            return;
        }
        if(inputs.size() == 1){
            if(inputs.get(0) < 0) System.out.print(0);
            else System.out.print(inputs.get(0));
            return;
        }
        if(inputs.size() % 2 == 1 && inputs.get(inputs.size() - 1) < 0)
            inputs.remove(inputs.size() - 1);
        for (Integer integer : inputs) {
            System.out.print(integer + " ");
        }

    }

}


/* بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ */
//codeforces
import java.io.*;
import java.util.*;
import static java.lang.Math.*;
import java.math.*;

public class Main{

	static PrintWriter go = new PrintWriter(System.out);
	static final BigInteger END = new BigInteger("-999999");

	public static void main(String args[]) throws IOException,FileNotFoundException {
		BufferedReader gi = new BufferedReader(new InputStreamReader(System.in, "ISO-8859-1"));
		int n = Integer.parseInt(gi.readLine());
    int[] a = parseArray(gi);
    List<Integer> neg = new ArrayList<>();
    List<Integer> pos = new ArrayList<>();
    for (int e: a)
      if (e < 0) neg.add(e);
      else if (e > 0) pos.add(e);
    Collections.sort(neg);
    if (neg.size() % 2 == 1)
      neg.remove(neg.size() - 1);
    for (int e: pos)
      go.print(e + " ");
    for (int e: neg)
      go.print(e + " ");
    if (neg.size() == 0 && pos.size() == 0)
      go.print(0);
    go.println();
		go.close();
	}

	static int[] parseArray(BufferedReader gi) throws IOException{
		String[] line = gi.readLine().split(" ");
		int[] rez = new int[line.length];
		for ( int k = 0; k < line.length; k++){
			rez[k] =  Integer.parseInt(line[k]);
		}
		return rez;
	}

}


/* بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ */
//codeforces
import java.io.*;
import java.util.*;
import static java.lang.Math.*;
import java.math.*;

public class Main{

	static PrintWriter go = new PrintWriter(System.out);

	public static void main(String args[]) throws IOException,FileNotFoundException {
		BufferedReader gi = new BufferedReader(new InputStreamReader(System.in, "ISO-8859-1"));
		int n = Integer.parseInt(gi.readLine());
    int[] a = parseArray(gi);
    List<Integer> neg = new ArrayList<>();
    List<Integer> pos = new ArrayList<>();
    for (int e: a)
      if (e < 0) neg.add(e);
      else if (e > 0) pos.add(e);
    Collections.sort(neg);
    if (neg.size() % 2 == 1)
      neg.remove(neg.size() - 1);
    for (int e: pos)
      go.print(e + " ");
    for (int e: neg)
      go.print(e + " ");
    if (neg.size() == 0 && pos.size() == 0)
      if (n > 1)
        go.print(0);
      else
        go.print(a[0]);
    go.println();
		go.close();
	}

	static int[] parseArray(BufferedReader gi) throws IOException{
		String[] line = gi.readLine().split(" ");
		int[] rez = new int[line.length];
		for ( int k = 0; k < line.length; k++){
			rez[k] =  Integer.parseInt(line[k]);
		}
		return rez;
	}

}


import java.io.OutputStreamWriter;
import java.io.BufferedWriter;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Writer;
import java.io.IOException;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.util.ArrayList;
import java.util.NoSuchElementException;
import java.math.BigInteger;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author Alex
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		TaskI solver = new TaskI();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskI {
    public void solve(int testNumber, InputReader in, OutputWriter out){
	    int n = in.ri();
	    int[] a = IOUtils.readIntArray(in, n);
	    Arrays.sort(a);
	    ArrayList<Integer> res = new ArrayList<>();
	    for(int i : a) if (i > 0) res.add(i);
	    for(int i = 0; i < a.length - 1; i+=2) {
		    if (a[i] < 0 && a[i + 1] < 0){
			    res.add(a[i]);
			    res.add(a[i + 1]);
		    }
	    }
	    if(!res.isEmpty()){
		    for(int i : res) out.print(i + " ");
	    }
	    else{
		    if (res.contains(0)) out.printLine(0);
		    else{
			    out.printLine(a[a.length - 1]);
		    }
	    }
    }
}

class InputReader {
	private InputStream stream;
	private byte[] buf = new byte[1024];
	private int curChar;
	private int numChars;
	private SpaceCharFilter filter;

	public InputReader(InputStream stream) {
		this.stream = stream;
	}

	public int read() {
		if (numChars == -1)
			throw new InputMismatchException();
		if (curChar >= numChars) {
			curChar = 0;
			try {
				numChars = stream.read(buf);
			} catch (IOException e) {
				throw new InputMismatchException();
			}
			if (numChars <= 0)
				return -1;
		}
		return buf[curChar++];
	}
	public int ri(){
		return readInt();
	}

	public int readInt() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
		}
		int res = 0;
		do {
			if (c < '0' || c > '9')
				throw new InputMismatchException();
			res *= 10;
			res += c - '0';
			c = read();
		} while (!isSpaceChar(c));
		return res * sgn;
	}
	public boolean isSpaceChar(int c) {
		if (filter != null)
			return filter.isSpaceChar(c);
		return isWhitespace(c);
	}

	public static boolean isWhitespace(int c) {
		return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
	}
	public interface SpaceCharFilter {
		public boolean isSpaceChar(int ch);
	}
}

class OutputWriter {
	private final PrintWriter writer;

	public OutputWriter(OutputStream outputStream) {
		writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
	}
	public void print(Object...objects) {
		for (int i = 0; i < objects.length; i++) {
			if (i != 0)
				writer.print(' ');
			writer.print(objects[i]);
		}
	}
	public void close() {
		writer.close();
	}
	public void printLine(int i) {
		writer.println(i);
	}

}

class IOUtils {
	public static int[] readIntArray(InputReader in, int size) {
		int[] array = new int[size];
		for (int i = 0; i < size; i++)
			array[i] = in.readInt();
		return array;
	}
}


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

public class CF45I {

    static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) {
        int n = sc.nextInt();
        int []numFreq = new int[201];
        for (int i=0; i<n; i++) {
            int num = sc.nextInt();
            numFreq[num + 100]++;
        }

        ArrayList<Integer> sortedNumbersWithoutZeros = new ArrayList<>(n);
        for (int i = 0; i < 201; i++) {
            if (i == 100) continue;     // Skip zeros

            for (int j = 0; j < numFreq[i]; j++) {
                sortedNumbersWithoutZeros.add(i - 100);
            }
        }

        StringBuilder output = new StringBuilder();
        for (int i = 0; i < sortedNumbersWithoutZeros.size() - 1; ) {
            if (sortedNumbersWithoutZeros.get(i) > 0 || sortedNumbersWithoutZeros.get(i + 1) < 0) {
                output.append(sortedNumbersWithoutZeros.get(i));
                output.append(" ");
                output.append(sortedNumbersWithoutZeros.get(i+1));
                output.append(" ");
                i += 2;
            } else i += 1;
        }

        if (sortedNumbersWithoutZeros.size() % 2 != 0
                && sortedNumbersWithoutZeros.get(sortedNumbersWithoutZeros.size() - 1) > 0) {
            output.append(sortedNumbersWithoutZeros.get(sortedNumbersWithoutZeros.size() - 1));
            output.append(" ");
        }

        if (output.length() < 1 && sortedNumbersWithoutZeros.size() > 0)
            output.append(sortedNumbersWithoutZeros.get(0));
        if (output.length() < 1)
            output.append(0);

        System.out.println(output);
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Scanner;
import java.util.StringTokenizer;

public class CF45I {

    public static void main(String[] args) {
        int n = fs.nextInt();
        int []numFreq = new int[201];
        for (int i=0; i<n; i++) {
            int num = fs.nextInt();
            numFreq[num + 100]++;
        }

        ArrayList<Integer> sortedNumbersWithoutZeros = new ArrayList<>(n);
        for (int i = 0; i < 201; i++) {
            if (i == 100) continue;     // Skip zeros

            for (int j = 0; j < numFreq[i]; j++) {
                sortedNumbersWithoutZeros.add(i - 100);
            }
        }

        ArrayList<Integer> outputList = new ArrayList<>();
        for (int i = 0; i < sortedNumbersWithoutZeros.size(); ) {
            if (i == sortedNumbersWithoutZeros.size() - 1 ) {
                if (outputList.size() < 1 || sortedNumbersWithoutZeros.get(sortedNumbersWithoutZeros.size() - 1) > 0)
                    outputList.add(sortedNumbersWithoutZeros.get(i));
                break;
            }

            if (sortedNumbersWithoutZeros.get(i) > 0 || sortedNumbersWithoutZeros.get(i + 1) < 0) {
                outputList.add(sortedNumbersWithoutZeros.get(i));
                outputList.add(sortedNumbersWithoutZeros.get(i+1));
                i += 2;
            } else i += 1;
        }

        if (outputList.size() < 1 || outputList.size() == 1 && outputList.get(0) < 0) {
            outputList.clear();
            if (numFreq[100] == 0)
                outputList.add(sortedNumbersWithoutZeros.get(0));
            else
                outputList.add(0);
        }

        StringBuilder output = new StringBuilder();
        for (int i = 0; i < outputList.size(); i++) output.append(outputList.get(i) + " ");

        System.out.println(output);
    }

    static class FastScanner {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st=new StringTokenizer("");

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

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

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

        long nextLong() {
            return Long.parseLong(next());
        }
    }
    static FastScanner fs = new FastScanner();
}


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

public class CF45I {

    static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) {
        int n = sc.nextInt();
        int []numFreq = new int[201];
        for (int i=0; i<n; i++) {
            int num = sc.nextInt();
            numFreq[num + 100]++;
        }

        ArrayList<Integer> sortedNumbersWithoutZeros = new ArrayList<>(n);
        for (int i = 0; i < 201; i++) {
            if (i == 100) continue;     // Skip zeros

            for (int j = 0; j < numFreq[i]; j++) {
                sortedNumbersWithoutZeros.add(i - 100);
            }
        }

        ArrayList<Integer> outputList = new ArrayList<>();
        for (int i = 0; i < sortedNumbersWithoutZeros.size(); ) {
            if (i == sortedNumbersWithoutZeros.size() - 1 ) {
                if (outputList.size() < 1 || sortedNumbersWithoutZeros.get(sortedNumbersWithoutZeros.size() - 1) > 0)
                    outputList.add(sortedNumbersWithoutZeros.get(i));
                break;
            }

            if (sortedNumbersWithoutZeros.get(i) > 0 || sortedNumbersWithoutZeros.get(i + 1) < 0) {
                outputList.add(sortedNumbersWithoutZeros.get(i));
                outputList.add(sortedNumbersWithoutZeros.get(i+1));
                i += 2;
            } else i += 1;
        }

        if (outputList.size() < 1 || outputList.size() == 1 && outputList.get(0) < 0) {
            outputList.clear();
            if (numFreq[100] == 0)
                outputList.add(sortedNumbersWithoutZeros.get(0));
            else
                outputList.add(0);
        }

        StringBuilder output = new StringBuilder();
        for (int i = 0; i < outputList.size(); i++) output.append(outputList.get(i) + " ");

        System.out.println(output);
    }
}


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

public class CF45I {

    static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) {
        int n = sc.nextInt();
        int []numFreq = new int[201];
        for (int i=0; i<n; i++) {
            int num = sc.nextInt();
            numFreq[num + 100]++;
        }

        ArrayList<Integer> sortedNumbersWithoutZeros = new ArrayList<>(n);
        for (int i = 0; i < 201; i++) {
            if (i == 100) continue;     // Skip zeros

            for (int j = 0; j < numFreq[i]; j++) {
                sortedNumbersWithoutZeros.add(i - 100);
            }
        }

        ArrayList<Integer> outputList = new ArrayList<>();
        for (int i = 0; i < sortedNumbersWithoutZeros.size(); ) {
            if (i == sortedNumbersWithoutZeros.size() - 1 ) {
                if (outputList.size() < 1 || sortedNumbersWithoutZeros.get(sortedNumbersWithoutZeros.size() - 1) > 0)
                    outputList.add(sortedNumbersWithoutZeros.get(i));
                break;
            }

            if (sortedNumbersWithoutZeros.get(i) > 0 || sortedNumbersWithoutZeros.get(i + 1) < 0) {
                outputList.add(sortedNumbersWithoutZeros.get(i));
                outputList.add(sortedNumbersWithoutZeros.get(i+1));
                i += 2;
            } else i += 1;
        }

        if (outputList.size() < 1 || outputList.size() == 1 && outputList.get(0) < 0) {
            outputList.clear();
            if (numFreq[100] == 0)
                outputList.add(sortedNumbersWithoutZeros.get(0));
            else
                outputList.add(0);
        }

        StringBuilder output = new StringBuilder();
        outputList.forEach(integer -> output.append(integer + " "));

        System.out.println(output);
    }
}


import java.util.Arrays;
import java.util.PriorityQueue;
import java.util.Scanner;

public class TCMCF {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[] arr = new int[n];
		boolean zero = true;
		PriorityQueue<Integer> neg = new PriorityQueue<Integer>();
		PriorityQueue<Integer> pos = new PriorityQueue<Integer>();
		for(int i = 0; i < n; i++){
			arr[i] = scan.nextInt();
			if(arr[i] != 0) zero = false;
			if(arr[i] < 0) neg.add(arr[i]);
			if(arr[i] > 0) pos.add(arr[i]);
		}
		if(zero){
			System.out.println("0");
			return;
		}
		int x = neg.size();
		if(x == 1 && pos.size() == 0){
			System.out.println(neg.poll());
			return;
		}
		if(x % 2 != 0){
			while(neg.size() > 1){
				System.out.print(neg.poll()+" ");
			}
		}
		else{
			while(!neg.isEmpty()){
				System.out.print(neg.poll()+" ");
			}
		}
		while(!pos.isEmpty()){
			System.out.print(pos.poll()+" ");
		}
	}
}


import java.util.Arrays;
import java.util.PriorityQueue;
import java.util.Scanner;

public class TCMCF {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[] arr = new int[n];
		boolean zero = true;
		PriorityQueue<Integer> neg = new PriorityQueue<Integer>();
		PriorityQueue<Integer> pos = new PriorityQueue<Integer>();
		for(int i = 0; i < n; i++){
			arr[i] = scan.nextInt();
			if(arr[i] != 0) zero = false;
			if(arr[i] < 0) neg.add(arr[i]);
			if(arr[i] > 0) pos.add(arr[i]);
		}
		if(zero){
			System.out.println("0");
			return;
		}
		int x = neg.size();
		if(x == 1 && pos.size() == 0 && n > 1){
			System.out.println("0");
			return;
		}
		if(x == 1 && pos.size() == 0 && n == 1){
			System.out.println(neg.poll());
			return;
		}
		if(x % 2 != 0){
			while(neg.size() > 1){
				System.out.print(neg.poll()+" ");
			}
		}
		else{
			while(!neg.isEmpty()){
				System.out.print(neg.poll()+" ");
			}
		}
		while(!pos.isEmpty()){
			System.out.print(pos.poll()+" ");
		}
	}
}


import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.BitSet;
import java.util.Calendar;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.SortedSet;
import java.util.Stack;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;

/**
 * #
 * @author pttrung
 */
public class I_SchoolTeamContest_3 {

    public static long MOD = 1000000007;

    public static void main(String[] args) throws FileNotFoundException {
        // PrintWriter out = new PrintWriter(new FileOutputStream(new File(
        // "output.txt")));
        PrintWriter out = new PrintWriter(System.out);
        Scanner in = new Scanner();
        int n = in.nextInt();
        if (n == 1) {
            out.println(in.nextInt());
        } else {
            int[] data = new int[n];
            int neg = 0;
            for (int i = 0; i < n; i++) {
                data[i] = in.nextInt();
                if (data[i] < 0) {
                    neg++;
                }
            }
            neg -= neg % 2;
            Arrays.sort(data);
            int total = neg;
            for(int i = 0; i < neg; i++){
                out.print(data[i] + " ");

            }
            for(int i = neg; i < n; i++){
                if(data[i] > 0){
                    out.print(data[i] + " ");
                    total++;
                }
            }
            if(total == 0){
                out.println(data[n - 1]);
            }
        }
        out.close();
    }

    public static int[] KMP(String val) {
        int i = 0;
        int j = -1;
        int[] result = new int[val.length() + 1];
        result[0] = -1;
        while (i < val.length()) {
            while (j >= 0 && val.charAt(j) != val.charAt(i)) {
                j = result[j];
            }
            j++;
            i++;
            result[i] = j;
        }
        return result;

    }

    public static boolean nextPer(int[] data) {
        int i = data.length - 1;
        while (i > 0 && data[i] < data[i - 1]) {
            i--;
        }
        if (i == 0) {
            return false;
        }
        int j = data.length - 1;
        while (data[j] < data[i - 1]) {
            j--;
        }
        int temp = data[i - 1];
        data[i - 1] = data[j];
        data[j] = temp;
        Arrays.sort(data, i, data.length);
        return true;
    }

    public static int digit(long n) {
        int result = 0;
        while (n > 0) {
            n /= 10;
            result++;
        }
        return result;
    }

    public static double dist(long a, long b, long x, long y) {
        double val = (b - a) * (b - a) + (x - y) * (x - y);
        val = Math.sqrt(val);
        double other = x * x + a * a;
        other = Math.sqrt(other);
        return val + other;

    }

    public static class Point implements Comparable<Point> {

        int x, y;

        public Point(int start, int end) {
            this.x = start;
            this.y = end;
        }

        @Override
        public int hashCode() {
            int hash = 5;
            hash = 47 * hash + this.x;
            hash = 47 * hash + this.y;
            return hash;
        }

        @Override
        public boolean equals(Object obj) {
            if (obj == null) {
                return false;
            }
            if (getClass() != obj.getClass()) {
                return false;
            }
            final Point other = (Point) obj;
            if (this.x != other.x) {
                return false;
            }
            if (this.y != other.y) {
                return false;
            }
            return true;
        }

        @Override
        public int compareTo(Point o) {
            return x - o.x;
        }
    }

    public static class FT {

        long[] data;

        FT(int n) {
            data = new long[n];
        }

        public void update(int index, long value) {
            while (index < data.length) {
                data[index] += value;
                index += (index & (-index));
            }
        }

        public long get(int index) {
            long result = 0;
            while (index > 0) {
                result += data[index];
                index -= (index & (-index));
            }
            return result;

        }
    }

    public static long gcd(long a, long b) {
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);
    }

    public static long pow(long a, long b, long MOD) {
        if (b == 0) {
            return 1;
        }
        if (b == 1) {
            return a;
        }
        long val = pow(a, b / 2, MOD);
        if (b % 2 == 0) {
            return val * val % MOD;
        } else {
            return val * (val * a % MOD) % MOD;

        }
    }

    static class Scanner {

        BufferedReader br;
        StringTokenizer st;

        public Scanner() throws FileNotFoundException {
            // System.setOut(new PrintStream(new BufferedOutputStream(System.out), true));
            br = new BufferedReader(new InputStreamReader(System.in));
            //  br = new BufferedReader(new InputStreamReader(new FileInputStream(new File("input.txt"))));
        }

        public String next() {

            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                    throw new RuntimeException();
                }
            }
            return st.nextToken();
        }

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

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

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

        public String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }

        public boolean endLine() {
            try {
                String next = br.readLine();
                while (next != null && next.trim().isEmpty()) {
                    next = br.readLine();
                }
                if (next == null) {
                    return true;
                }
                st = new StringTokenizer(next);
                return st.hasMoreTokens();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }
    }
}


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

public class B {
    public static void main(String[] args) throws Exception {
        FastScannerB fs = new FastScannerB();
        PrintWriter out = new PrintWriter(System.out);

        int n =fs.nextInt();
        int[] a = fs.nextIntArray(n);
        int neg=  0, small = -10000;
        for(int i= 0; i < n; i++)
            if(a[i] < 0) {
                neg++;
                small = Math.max(small, a[i]);
            }
        if(n==1) {
            out.println(a[0]);
        }
        else if(neg%2==0) {
            StringBuilder res = new StringBuilder();
            for(int i = 0; i < n; i++) {
                if(a[i] != 0) res.append(a[i] + " ");
            }
            if(res.length() == 0) res.append(0);
            out.println(res.toString().trim());
        } else {
            StringBuilder res = new StringBuilder();
            for(int i = 0; i < n; i++) {
                if(a[i] == small) {
                    small = Integer.MAX_VALUE;
                    continue;
                }
                else if(a[i] != 0) res.append(a[i]).append(" ");
            }
            if(res.length() == 0) res.append(0);
            out.println(res.toString().trim());

        }
        out.close();
    }
}

class FastScannerB {
    BufferedReader br;
    StringTokenizer st;

    public FastScannerB() {
        try	{
            br = new BufferedReader(new InputStreamReader(System.in));
            st = new StringTokenizer("");
        } catch (Exception e){e.printStackTrace();}
    }

    public String next() {
        if (st.hasMoreTokens())	return st.nextToken();
        try {st = new StringTokenizer(br.readLine());}
        catch (Exception 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 line = "";
        try {line = br.readLine();}
        catch (Exception e) {e.printStackTrace();}
        return line;
    }

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

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

    public char[] nextCharArray() {
        return next().toCharArray();
    }
}


import java.io.*;
import java.util.*;
public class MyClass {
    public static void main(String args[]) {
        Scanner sc=new Scanner(System.in);
         int n=sc.nextInt();
         int a[]=new int[n];
         for(int i=0;i<n;i++)
           a[i]=sc.nextInt();
         int k=0;
         for(int i=0;i<n;i++)
         {
             if(a[i]<0)
                k++;
         }
         int z=k;
          if(k%2==1)
            z=k-1;
            int m=0;
            Arrays.sort(a);
            for(int i=0;i<z;i++)
            {  System.out.print(a[i]+" ");
                m=1;
            }
              for(int i=k;i<n;i++)
              {
                  if(a[i]!=0)
                  System.out.print(a[i]+" ");
              }
              if(m==0||a[n-1]==0)
              System.out.println(a[n-1]);
    }
}


import java.io.*;
import java.util.*;
public class MyClass {
    public static void main(String args[]) {
        Scanner sc=new Scanner(System.in);
         int n=sc.nextInt();
         int a[]=new int[n];
         for(int i=0;i<n;i++)
           a[i]=sc.nextInt();
         int k=0;
         for(int i=0;i<n;i++)
         {
             if(a[i]<0)
                k++;
         }
         int z=k;
          if(k%2==1)
            z=k-1;
            int m=0;
            Arrays.sort(a);
            for(int i=0;i<z;i++)
            {  System.out.print(a[i]+" ");
                m=1;
            }
              for(int i=k;i<n;i++)
              {   m=1;
                  if(a[i]!=0)
                  System.out.print(a[i]+" ");
              }
              if(m==0||a[n-1]==0)
              System.out.println(a[n-1]);
    }
}


import java.io.*;
import java.util.*;
public class MyClass {
    public static void main(String args[]) {
        Scanner sc=new Scanner(System.in);
         int n=sc.nextInt();
         int a[]=new int[n];
         for(int i=0;i<n;i++)
           a[i]=sc.nextInt();
         int k=0;
         for(int i=0;i<n;i++)
         {
             if(a[i]<0)
                k++;
         }
         int z=k;
          if(k%2==1)
            z=k-1;
            int m=0;
            Arrays.sort(a);
            for(int i=0;i<z;i++)
            {  System.out.print(a[i]+" ");
                m=1;
            }
              for(int i=k;i<n;i++)
              {   m=1;
                  if(a[i]!=0)
                  System.out.print(a[i]+" ");
              }
              if(m==0||(a[n-1]==0&&m==0))
              System.out.println(a[n-1]);
    }
}


import java.io.*;
import java.util.*;
public class MyClass {
    public static void main(String args[]) {
        Scanner sc=new Scanner(System.in);
         int n=sc.nextInt();
         int a[]=new int[n];
         for(int i=0;i<n;i++)
           a[i]=sc.nextInt();
         int k=0;
         for(int i=0;i<n;i++)
         {
             if(a[i]<0)
                k++;
         }
         int z=k;
          if(k%2==1)
            z=k-1;
            int m=0;
            Arrays.sort(a);
            for(int i=0;i<z;i++)
            {  System.out.print(a[i]+" ");
                m=1;
            }
              for(int i=k;i<n;i++)
              {    if(a[i]!=0)
                   {  m=1;
                  System.out.print(a[i]+" ");
                   }
                   else if(a[n-1]==0&&m==0)
                {    System.out.print(a[i]);
                       m=1;
                      break;
                }
              }
              if(m==0)
              System.out.println(a[n-1]);
    }
}


import java.io.*;
import java.util.*;
public class MyClass {
    public static void main(String args[]) {
        Scanner sc=new Scanner(System.in);
         int n=sc.nextInt();
         int a[]=new int[n];
         for(int i=0;i<n;i++)
           a[i]=sc.nextInt();
         int k=0;
         for(int i=0;i<n;i++)
         {
             if(a[i]<0)
                k++;
         }
         int z=k;
          if(k%2==1)
            z=k-1;
            Arrays.sort(a);
            for(int i=0;i<z;i++)
              System.out.print(a[i]+" ");
              for(int i=k;i<n;i++)
              {
                  if(a[i]!=0)
                  System.out.print(a[i]+" ");
              }
    }
}


import java.io.*;
import java.util.*;
public class MyClass {
    public static void main(String args[]) {
        Scanner sc=new Scanner(System.in);
         int n=sc.nextInt();
         int a[]=new int[n];
         for(int i=0;i<n;i++)
           a[i]=sc.nextInt();
         int k=0;
         for(int i=0;i<n;i++)
         {
             if(a[i]<0)
                k++;
         }
         int z=k;
          if(k%2==1)
            z=k-1;
            Arrays.sort(a);
            for(int i=0;i<z;i++)
              System.out.print(a[i]+" ");
              for(int i=k;i<n;i++)
              {
                  if(a[i]!=0)
                  System.out.print(a[i]+" ");
              }
              if(n==1&&a[0]<0)
              System.out.println(a[0]);
    }
}


/*
 * Hello! You are trying to hack my solution, are you? =)
 * Don't be afraid of the size, it's just a dump of useful methods like gcd, or n-th Fib number.
 * And I'm just to lazy to create a new .java for every task.
 * And if you were successful to hack my solution, please, send me this test as a message or to Abrackadabraa@gmail.com.
 * It can help me improve my skills and i'd be very grateful for that.
 * Sorry for time you spent reading this message. =)
 * Good luck, unknown rival. =)
 * */

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.Reader;
import java.io.StreamTokenizer;
import java.io.Writer;
import java.math.BigInteger;
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashSet;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.List;
import java.util.Random;
import java.util.Set;
import java.util.SortedSet;
import java.util.Stack;
import java.util.TreeMap;
import java.util.TreeSet;
import java.util.Vector;

public class Abra {
	public static void main(String[] args) throws IOException {
		new Abra().run();
	}

	static class myLib {
		long fact(long x) {
			long a = 1;
			for (long i = 2; i <= x; i++) {
				a *= i;
			}
			return a;
		}

		long digitSum(String x) {
			long a = 0;
			for (int i = 0; i < x.length(); i++) {
				a += x.charAt(i) - '0';
			}
			return a;
		}

		long digitSum(long x) {
			long a = 0;
			while (x > 0) {
				a += x % 10;
				x /= 10;
			}
			return a;
		}

		long digitMul(long x) {
			long a = 1;
			while (x > 0) {
				a *= x % 10;
				x /= 10;
			}
			return a;
		}

		int digitCubesSum(int x) {
			int a = 0;
			while (x > 0) {
				a += (x % 10) * (x % 10) * (x % 10);
				x /= 10;
			}
			return a;
		}

		double pif(double ax, double ay, double bx, double by) {
			return Math.sqrt((ax - bx) * (ax - bx) + (ay - by) * (ay - by));
		}

		double pif3D(double ax, double ay, double az, double bx, double by, double bz) {
			return Math.sqrt((ax - bx) * (ax - bx) + (ay - by) * (ay - by) + (az - bz) * (az - bz));
		}

		double pif3D(double[] a, double[] b) {
			return Math.sqrt((a[0] - b[0]) * (a[0] - b[0]) + (a[1] - b[1]) * (a[1] - b[1]) + (a[2] - b[2]) * (a[2] - b[2]));
		}

		long gcd(long a, long b) {
			if (a == 0 || b == 0) return 1;
			if (a < b) {
				long c = b;
				b = a;
				a = c;
			}
			while (a % b != 0) {
				a = a % b;
				if (a < b) {
					long c = b;
					b = a;
					a = c;
				}
			}
			return b;
		}

		int gcd(int a, int b) {
			if (a == 0 || b == 0) return 1;
			if (a < b) {
				int c = b;
				b = a;
				a = c;
			}
			while (a % b != 0) {
				a = a % b;
				if (a < b) {
					int c = b;
					b = a;
					a = c;
				}
			}
			return b;
		}

		long lcm(long a, long b) throws IOException {
			return a * b / gcd(a, b);
		}

		int lcm(int a, int b) throws IOException {
			return a * b / gcd(a, b);
		}

		int countOccurences(String x, String y) {
			int a = 0, i = 0;
			while (true) {
				i = y.indexOf(x);
				if (i == -1) break;
				a++;
				y = y.substring(i + 1);
			}
			return a;
		}

		int[] findPrimes(int x) {
			boolean[] forErato = new boolean[x - 1];
			List<Integer> t = new Vector<Integer>();
			int l = 0, j = 0;
			for (int i = 2; i < x; i++) {
				if (forErato[i - 2]) continue;
				t.add(i);
				l++;
				j = i * 2;
				while (j < x) {
					forErato[j - 2] = true;
					j += i;
				}
			}
			int[] primes = new int[l];
			Iterator<Integer> iterator = t.iterator();
			for (int i = 0; iterator.hasNext(); i++) {
				primes[i] = iterator.next().intValue();
			}
			return primes;
		}

		int rev(int x) {
			int a = 0;
			while (x > 0) {
				a = a * 10 + x % 10;
				x /= 10;
			}
			return a;
		}

		class myDate {
			int d, m, y;

			int[] ml = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };

			public myDate(int da, int ma, int ya) {
				d = da;
				m = ma;
				y = ya;
				if ((ma > 12 || ma < 1 || da > ml[ma - 1] || da < 1) && !(d == 29 && m == 2 && y % 4 == 0)) {
					d = 1;
					m = 1;
					y = 9999999;
				}
			}

			void incYear(int x) {
				for (int i = 0; i < x; i++) {
					y++;
					if (m == 2 && d == 29) {
						m = 3;
						d = 1;
						return;
					}
					if (m == 3 && d == 1) {
						if (((y % 4 == 0) && (y % 100 != 0)) || (y % 400 == 0)) {
							m = 2;
							d = 29;
						}
						return;
					}
				}
			}

			boolean less(myDate x) {
				if (y < x.y) return true;
				if (y > x.y) return false;
				if (m < x.m) return true;
				if (m > x.m) return false;
				if (d < x.d) return true;
				if (d > x.d) return false;
				return true;
			}

			void inc() {
				if ((d == 31) && (m == 12)) {
					y++;
					d = 1;
					m = 1;
				} else {
					if (((y % 4 == 0) && (y % 100 != 0)) || (y % 400 == 0)) {
						ml[1] = 29;
					}
					if (d == ml[m - 1]) {
						m++;
						d = 1;
					} else
						d++;
				}
			}
		}

		int partition(int n, int l, int m) {// n - sum, l - length, m - every
											// part
			// <= m
			if (n < l) return 0;
			if (n < l + 2) return 1;
			if (l == 1) return 1;
			int c = 0;
			for (int i = Math.min(n - l + 1, m); i >= (n + l - 1) / l; i--) {
				c += partition(n - i, l - 1, i);
			}
			return c;
		}

		int rifmQuality(String a, String b) {
			if (a.length() > b.length()) {
				String c = a;
				a = b;
				b = c;
			}
			int c = 0, d = b.length() - a.length();
			for (int i = a.length() - 1; i >= 0; i--) {
				if (a.charAt(i) == b.charAt(i + d)) c++;
				else
					break;
			}
			return c;
		}

		String numSym = "0123456789ABCDEF";

		String ZFromXToYNotation(int x, int y, String z) {
			if (z.equals("0")) return "0";
			String a = "";
			// long q = 0, t = 1;
			BigInteger q = BigInteger.ZERO, t = BigInteger.ONE;
			for (int i = z.length() - 1; i >= 0; i--) {
				q = q.add(t.multiply(BigInteger.valueOf(z.charAt(i) - 48)));
				t = t.multiply(BigInteger.valueOf(x));
			}
			while (q.compareTo(BigInteger.ZERO) == 1) {
				a = numSym.charAt((int) (q.mod(BigInteger.valueOf(y)).intValue())) + a;
				q = q.divide(BigInteger.valueOf(y));
			}
			return a;
		}

		double angleFromXY(int x, int y) {
			if ((x == 0) && (y > 0)) return Math.PI / 2;
			if ((x == 0) && (y < 0)) return -Math.PI / 2;
			if ((y == 0) && (x > 0)) return 0;
			if ((y == 0) && (x < 0)) return Math.PI;
			if (x > 0) return Math.atan((double) y / x);
			else {
				if (y > 0) return Math.atan((double) y / x) + Math.PI;
				else
					return Math.atan((double) y / x) - Math.PI;
			}
		}

		static boolean isNumber(String x) {
			try {
				Integer.parseInt(x);
			} catch (NumberFormatException ex) {
				return false;
			}
			return true;
		}

		static boolean stringContainsOf(String x, String c) {
			for (int i = 0; i < x.length(); i++) {
				if (c.indexOf(x.charAt(i)) == -1) return false;
			}
			return true;
		}

		long pow(long a, long n) { // b > 0
			if (n == 0) return 1;
			long k = n, b = 1, c = a;
			while (k != 0) {
				if (k % 2 == 0) {
					k /= 2;
					c *= c;
				} else {
					k--;
					b *= c;
				}
			}
			return b;
		}

		int pow(int a, int n) { // b > 0
			if (n == 0) return 1;
			int k = n, b = 1, c = a;
			while (k != 0) {
				if (k % 2 == 0) {
					k /= 2;
					c *= c;
				} else {
					k--;
					b *= c;
				}
			}
			return b;
		}

		double pow(double a, int n) { // b > 0
			if (n == 0) return 1;
			double k = n, b = 1, c = a;
			while (k != 0) {
				if (k % 2 == 0) {
					k /= 2;
					c *= c;
				} else {
					k--;
					b *= c;
				}
			}
			return b;
		}

		double log2(double x) {
			return Math.log(x) / Math.log(2);
		}

		int lpd(int[] primes, int x) {// least prime divisor
			int i;
			for (i = 0; primes[i] <= x / 2; i++) {
				if (x % primes[i] == 0) {
					return primes[i];
				}
			}
			;
			return x;
		}

		int np(int[] primes, int x) {// number of prime number
			for (int i = 0; true; i++) {
				if (primes[i] == x) return i;
			}
		}

		int[] dijkstra(int[][] map, int n, int s) {
			int[] p = new int[n];
			boolean[] b = new boolean[n];
			Arrays.fill(p, Integer.MAX_VALUE);
			p[s] = 0;
			b[s] = true;
			for (int i = 0; i < n; i++) {
				if (i != s) p[i] = map[s][i];
			}
			while (true) {
				int m = Integer.MAX_VALUE, mi = -1;
				for (int i = 0; i < n; i++) {
					if (!b[i] && (p[i] < m)) {
						mi = i;
						m = p[i];
					}
				}
				if (mi == -1) break;
				b[mi] = true;
				for (int i = 0; i < n; i++)
					if (p[mi] + map[mi][i] < p[i]) p[i] = p[mi] + map[mi][i];
			}
			return p;
		}

		boolean isLatinChar(char x) {
			if (((x >= 'a') && (x <= 'z')) || ((x >= 'A') && (x <= 'Z'))) return true;
			else
				return false;
		}

		boolean isBigLatinChar(char x) {
			if (x >= 'A' && x <= 'Z') return true;
			else
				return false;
		}

		boolean isSmallLatinChar(char x) {
			if (x >= 'a' && x <= 'z') return true;
			else
				return false;
		}

		boolean isDigitChar(char x) {
			if (x >= '0' && x <= '9') return true;
			else
				return false;
		}

		class NotANumberException extends Exception {
			private static final long serialVersionUID = 1L;
			String mistake;

			NotANumberException() {
				mistake = "Unknown.";
			}

			NotANumberException(String message) {
				mistake = message;
			}
		}

		class Real {
			String num = "0";
			long exp = 0;
			boolean pos = true;

			long length() {
				return num.length();
			}

			void check(String x) throws NotANumberException {
				if (!stringContainsOf(x, "0123456789+-.eE")) throw new NotANumberException("Illegal character.");
				long j = 0;
				for (long i = 0; i < x.length(); i++) {
					if ((x.charAt((int) i) == '-') || (x.charAt((int) i) == '+')) {
						if (j == 0) j = 1;
						else
							if (j == 5) j = 6;
							else
								throw new NotANumberException("Unexpected sign.");
					} else
						if ("0123456789".indexOf(x.charAt((int) i)) != -1) {
							if (j == 0) j = 2;
							else
								if (j == 1) j = 2;
								else
									if (j == 2)
									;
									else
										if (j == 3) j = 4;
										else
											if (j == 4)
											;
											else
												if (j == 5) j = 6;
												else
													if (j == 6)
													;
													else
														throw new NotANumberException("Unexpected digit.");
						} else
							if (x.charAt((int) i) == '.') {
								if (j == 0) j = 3;
								else
									if (j == 1) j = 3;
									else
										if (j == 2) j = 3;
										else
											throw new NotANumberException("Unexpected dot.");
							} else
								if ((x.charAt((int) i) == 'e') || (x.charAt((int) i) == 'E')) {
									if (j == 2) j = 5;
									else
										if (j == 4) j = 5;
										else
											throw new NotANumberException("Unexpected exponent.");
								} else
									throw new NotANumberException("O_o.");
				}
				if ((j == 0) || (j == 1) || (j == 3) || (j == 5)) throw new NotANumberException("Unexpected end.");
			}

			public Real(String x) throws NotANumberException {
				check(x);
				if (x.charAt(0) == '-') pos = false;
				long j = 0;
				String e = "";
				boolean epos = true;
				for (long i = 0; i < x.length(); i++) {
					if ("0123456789".indexOf(x.charAt((int) i)) != -1) {
						if (j == 0) num += x.charAt((int) i);
						if (j == 1) {
							num += x.charAt((int) i);
							exp--;
						}
						if (j == 2) e += x.charAt((int) i);
					}
					if (x.charAt((int) i) == '.') {
						if (j == 0) j = 1;
					}
					if ((x.charAt((int) i) == 'e') || (x.charAt((int) i) == 'E')) {
						j = 2;
						if (x.charAt((int) (i + 1)) == '-') epos = false;
					}
				}
				while ((num.length() > 1) && (num.charAt(0) == '0'))
					num = num.substring(1);
				while ((num.length() > 1) && (num.charAt(num.length() - 1) == '0')) {
					num = num.substring(0, num.length() - 1);
					exp++;
				}
				if (num.equals("0")) {
					exp = 0;
					pos = true;
					return;
				}
				while ((e.length() > 1) && (e.charAt(0) == '0'))
					e = e.substring(1);
				try {
					if (e != "") if (epos) exp += Long.parseLong(e);
					else
						exp -= Long.parseLong(e);
				} catch (NumberFormatException exc) {
					if (!epos) {
						num = "0";
						exp = 0;
						pos = true;
					} else {
						throw new NotANumberException("Too long exponent");
					}
				}
			}

			public Real() {
			}

			String toString(long mantissa) {
				String a = "", b = "";
				if (exp >= 0) {
					a = num;
					if (!pos) a = '-' + a;
					for (long i = 0; i < exp; i++)
						a += '0';
					for (long i = 0; i < mantissa; i++)
						b += '0';
					if (mantissa == 0) return a;
					else
						return a + "." + b;
				} else {
					if (exp + length() <= 0) {
						a = "0";
						if (mantissa == 0) {
							return a;
						}
						if (mantissa < -(exp + length() - 1)) {
							for (long i = 0; i < mantissa; i++)
								b += '0';
							return a + "." + b;
						} else {
							if (!pos) a = '-' + a;
							for (long i = 0; i < mantissa; i++)
								if (i < -(exp + length())) b += '0';
								else
									if (i + exp >= 0) b += '0';
									else
										b += num.charAt((int) (i + exp + length()));
							return a + "." + b;
						}
					} else {
						if (!pos) a = "-";
						for (long i = 0; i < exp + length(); i++)
							a += num.charAt((int) i);
						if (mantissa == 0) return a;
						for (long i = exp + length(); i < exp + length() + mantissa; i++)
							if (i < length()) b += num.charAt((int) i);
							else
								b += '0';
						return a + "." + b;
					}
				}
			}
		}

		boolean containsRepeats(int... num) {
			Set<Integer> s = new TreeSet<Integer>();
			for (int d : num)
				if (!s.contains(d)) s.add(d);
				else
					return true;
			return false;
		}

		int[] rotateDice(int[] a, int n) {
			int[] c = new int[6];
			if (n == 0) {
				c[0] = a[1];
				c[1] = a[5];
				c[2] = a[2];
				c[3] = a[0];
				c[4] = a[4];
				c[5] = a[3];
			}
			if (n == 1) {
				c[0] = a[2];
				c[1] = a[1];
				c[2] = a[5];
				c[3] = a[3];
				c[4] = a[0];
				c[5] = a[4];
			}
			if (n == 2) {
				c[0] = a[3];
				c[1] = a[0];
				c[2] = a[2];
				c[3] = a[5];
				c[4] = a[4];
				c[5] = a[1];
			}
			if (n == 3) {
				c[0] = a[4];
				c[1] = a[1];
				c[2] = a[0];
				c[3] = a[3];
				c[4] = a[5];
				c[5] = a[2];
			}
			if (n == 4) {
				c[0] = a[0];
				c[1] = a[2];
				c[2] = a[3];
				c[3] = a[4];
				c[4] = a[1];
				c[5] = a[5];
			}
			if (n == 5) {
				c[0] = a[0];
				c[1] = a[4];
				c[2] = a[1];
				c[3] = a[2];
				c[4] = a[3];
				c[5] = a[5];
			}
			return c;
		}

		int min(int... a) {
			int c = Integer.MAX_VALUE;
			for (int d : a)
				if (d < c) c = d;
			return c;
		}

		int max(int... a) {
			int c = Integer.MIN_VALUE;
			for (int d : a)
				if (d > c) c = d;
			return c;
		}

		int[] normalizeDice(int[] a) {
			int[] c = a.clone();
			if (c[0] != 0) if (c[1] == 0) c = rotateDice(c, 0);
			else
				if (c[2] == 0) c = rotateDice(c, 1);
				else
					if (c[3] == 0) c = rotateDice(c, 2);
					else
						if (c[4] == 0) c = rotateDice(c, 3);
						else
							if (c[5] == 0) c = rotateDice(rotateDice(c, 0), 0);
			while (c[1] != min(c[1], c[2], c[3], c[4]))
				c = rotateDice(c, 4);
			return c;
		}

		boolean sameDice(int[] a, int[] b) {
			for (int i = 0; i < 6; i++)
				if (a[i] != b[i]) return false;
			return true;
		}

		final double goldenRatio = (1 + Math.sqrt(5)) / 2;
		final double aGoldenRatio = (1 - Math.sqrt(5)) / 2;

		long Fib(int n) {
			if (n < 0) if (n % 2 == 0) return -Math.round((pow(goldenRatio, -n) - pow(aGoldenRatio, -n)) / Math.sqrt(5));
			else
				return -Math.round((pow(goldenRatio, -n) - pow(aGoldenRatio, -n)) / Math.sqrt(5));
			return Math.round((pow(goldenRatio, n) - pow(aGoldenRatio, n)) / Math.sqrt(5));
		}

		class japaneeseComparator implements Comparator<String> {
			@Override
			public int compare(String a, String b) {
				int ai = 0, bi = 0;
				boolean m = false, ns = false;
				if (a.charAt(ai) <= '9' && a.charAt(ai) >= '0') {
					if (b.charAt(bi) <= '9' && b.charAt(bi) >= '0') m = true;
					else
						return -1;
				}
				if (b.charAt(bi) <= '9' && b.charAt(bi) >= '0') {
					if (a.charAt(ai) <= '9' && a.charAt(ai) >= '0') m = true;
					else
						return 1;
				}
				a += "!";
				b += "!";
				int na = 0, nb = 0;
				while (true) {
					if (a.charAt(ai) == '!') {
						if (b.charAt(bi) == '!') break;
						return -1;
					}
					if (b.charAt(bi) == '!') {
						return 1;
					}
					if (m) {
						int ab = -1, bb = -1;
						while (a.charAt(ai) <= '9' && a.charAt(ai) >= '0') {
							if (ab == -1) ab = ai;
							ai++;
						}
						while (b.charAt(bi) <= '9' && b.charAt(bi) >= '0') {
							if (bb == -1) bb = bi;
							bi++;
						}
						m = !m;
						if (ab == -1) {
							if (bb == -1) continue;
							else
								return 1;
						}
						if (bb == -1) return -1;
						while (a.charAt(ab) == '0' && ab + 1 != ai) {
							ab++;
							if (!ns) na++;
						}
						while (b.charAt(bb) == '0' && bb + 1 != bi) {
							bb++;
							if (!ns) nb++;
						}
						if (na != nb) ns = true;
						if (ai - ab < bi - bb) return -1;
						if (ai - ab > bi - bb) return 1;
						for (int i = 0; i < ai - ab; i++) {
							if (a.charAt(ab + i) < b.charAt(bb + i)) return -1;
							if (a.charAt(ab + i) > b.charAt(bb + i)) return 1;
						}
					} else {
						m = !m;
						while (true) {
							if (a.charAt(ai) <= 'z' && a.charAt(ai) >= 'a' && b.charAt(bi) <= 'z' && b.charAt(bi) >= 'a') {
								if (a.charAt(ai) < b.charAt(bi)) return -1;
								if (a.charAt(ai) > b.charAt(bi)) return 1;
								ai++;
								bi++;
							} else
								if (a.charAt(ai) <= 'z' && a.charAt(ai) >= 'a') return 1;
								else
									if (b.charAt(bi) <= 'z' && b.charAt(bi) >= 'a') return -1;
									else
										break;
						}
					}
				}
				if (na < nb) return 1;
				if (na > nb) return -1;
				return 0;
			}
		}

		Random random = new Random();
	}

	StreamTokenizer in;
	PrintWriter out;
	boolean oj;
	BufferedReader br;

	void init() throws IOException {
		oj = System.getProperty("ONLINE_JUDGE") != null;
		Reader reader = oj ? new InputStreamReader(System.in) : new FileReader("input.txt");
		Writer writer = oj ? new OutputStreamWriter(System.out) : new FileWriter("output.txt");
		br = new BufferedReader(reader);
		in = new StreamTokenizer(br);
		out = new PrintWriter(writer);
	}

	long selectionTime = 0;

	void startSelection() {
		selectionTime -= System.currentTimeMillis();
	}

	void stopSelection() {
		selectionTime += System.currentTimeMillis();
	}

	void run() throws IOException {
		long beginTime = System.currentTimeMillis();
		long beginMem = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();
		init();
		solve();
		long endMem = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();
		long endTime = System.currentTimeMillis();
		if (!oj) {
			System.out.println("Memory used = " + (endMem - beginMem));
			System.out.println("Total memory = " + (Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()));
			System.out.println("Running time = " + (endTime - beginTime));
		}
		out.flush();
	}

	int nextInt() throws IOException {
		in.nextToken();
		return (int) in.nval;
	}

	long nextLong() throws IOException {
		in.nextToken();
		return (long) in.nval;
	}

	String nextString() throws IOException {
		in.nextToken();
		return in.sval;
	}

	double nextDouble() throws IOException {
		in.nextToken();
		return in.nval;
	}

	myLib lib = new myLib();

	void solve() throws IOException {
		int n = nextInt();
		int[] pos = new int[n], neg = new int[n];
		int pl = 0, nl = 0;
		int o = 0, nn = 0;
		for (int i = 0; i < n; i++) {
			int t = nextInt();
			if (t == 0) continue; else nn++;
			if (t > 0) {
				pos[pl] = t;
				pl++;
			}
			if (t < 0) {
				neg[nl] = t;
				nl++;
			}
		}
		if (nn == 0 || (pl == 0 && nl == 1)) {
			out.print(0);
			return;
		}
		pos = Arrays.copyOf(pos, pl);
		Arrays.sort(pos);
		neg = Arrays.copyOf(neg, nl);
		Arrays.sort(neg);
		for (int i = 0; i < pl; i++) {
			out.print(pos[i] + " ");
		}
		if (pl == 0 && nl == 1) {
			out.print(neg[0]);
			return;
		}
		for (int i = 0; i < nl - nl % 2; i++) {
			out.print(neg[i] + " ");
		}
	}
}


/*
 * Hello! You are trying to hack my solution, are you? =)
 * Don't be afraid of the size, it's just a dump of useful methods like gcd, or n-th Fib number.
 * And I'm just to lazy to create a new .java for every task.
 * And if you were successful to hack my solution, please, send me this test as a message or to Abrackadabraa@gmail.com.
 * It can help me improve my skills and i'd be very grateful for that.
 * Sorry for time you spent reading this message. =)
 * Good luck, unknown rival. =)
 * */

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.Reader;
import java.io.StreamTokenizer;
import java.io.Writer;
import java.math.BigInteger;
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashSet;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.List;
import java.util.Random;
import java.util.Set;
import java.util.SortedSet;
import java.util.Stack;
import java.util.TreeMap;
import java.util.TreeSet;
import java.util.Vector;

public class Abra {
	public static void main(String[] args) throws IOException {
		new Abra().run();
	}

	static class myLib {
		long fact(long x) {
			long a = 1;
			for (long i = 2; i <= x; i++) {
				a *= i;
			}
			return a;
		}

		long digitSum(String x) {
			long a = 0;
			for (int i = 0; i < x.length(); i++) {
				a += x.charAt(i) - '0';
			}
			return a;
		}

		long digitSum(long x) {
			long a = 0;
			while (x > 0) {
				a += x % 10;
				x /= 10;
			}
			return a;
		}

		long digitMul(long x) {
			long a = 1;
			while (x > 0) {
				a *= x % 10;
				x /= 10;
			}
			return a;
		}

		int digitCubesSum(int x) {
			int a = 0;
			while (x > 0) {
				a += (x % 10) * (x % 10) * (x % 10);
				x /= 10;
			}
			return a;
		}

		double pif(double ax, double ay, double bx, double by) {
			return Math.sqrt((ax - bx) * (ax - bx) + (ay - by) * (ay - by));
		}

		double pif3D(double ax, double ay, double az, double bx, double by, double bz) {
			return Math.sqrt((ax - bx) * (ax - bx) + (ay - by) * (ay - by) + (az - bz) * (az - bz));
		}

		double pif3D(double[] a, double[] b) {
			return Math.sqrt((a[0] - b[0]) * (a[0] - b[0]) + (a[1] - b[1]) * (a[1] - b[1]) + (a[2] - b[2]) * (a[2] - b[2]));
		}

		long gcd(long a, long b) {
			if (a == 0 || b == 0) return 1;
			if (a < b) {
				long c = b;
				b = a;
				a = c;
			}
			while (a % b != 0) {
				a = a % b;
				if (a < b) {
					long c = b;
					b = a;
					a = c;
				}
			}
			return b;
		}

		int gcd(int a, int b) {
			if (a == 0 || b == 0) return 1;
			if (a < b) {
				int c = b;
				b = a;
				a = c;
			}
			while (a % b != 0) {
				a = a % b;
				if (a < b) {
					int c = b;
					b = a;
					a = c;
				}
			}
			return b;
		}

		long lcm(long a, long b) throws IOException {
			return a * b / gcd(a, b);
		}

		int lcm(int a, int b) throws IOException {
			return a * b / gcd(a, b);
		}

		int countOccurences(String x, String y) {
			int a = 0, i = 0;
			while (true) {
				i = y.indexOf(x);
				if (i == -1) break;
				a++;
				y = y.substring(i + 1);
			}
			return a;
		}

		int[] findPrimes(int x) {
			boolean[] forErato = new boolean[x - 1];
			List<Integer> t = new Vector<Integer>();
			int l = 0, j = 0;
			for (int i = 2; i < x; i++) {
				if (forErato[i - 2]) continue;
				t.add(i);
				l++;
				j = i * 2;
				while (j < x) {
					forErato[j - 2] = true;
					j += i;
				}
			}
			int[] primes = new int[l];
			Iterator<Integer> iterator = t.iterator();
			for (int i = 0; iterator.hasNext(); i++) {
				primes[i] = iterator.next().intValue();
			}
			return primes;
		}

		int rev(int x) {
			int a = 0;
			while (x > 0) {
				a = a * 10 + x % 10;
				x /= 10;
			}
			return a;
		}

		class myDate {
			int d, m, y;

			int[] ml = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };

			public myDate(int da, int ma, int ya) {
				d = da;
				m = ma;
				y = ya;
				if ((ma > 12 || ma < 1 || da > ml[ma - 1] || da < 1) && !(d == 29 && m == 2 && y % 4 == 0)) {
					d = 1;
					m = 1;
					y = 9999999;
				}
			}

			void incYear(int x) {
				for (int i = 0; i < x; i++) {
					y++;
					if (m == 2 && d == 29) {
						m = 3;
						d = 1;
						return;
					}
					if (m == 3 && d == 1) {
						if (((y % 4 == 0) && (y % 100 != 0)) || (y % 400 == 0)) {
							m = 2;
							d = 29;
						}
						return;
					}
				}
			}

			boolean less(myDate x) {
				if (y < x.y) return true;
				if (y > x.y) return false;
				if (m < x.m) return true;
				if (m > x.m) return false;
				if (d < x.d) return true;
				if (d > x.d) return false;
				return true;
			}

			void inc() {
				if ((d == 31) && (m == 12)) {
					y++;
					d = 1;
					m = 1;
				} else {
					if (((y % 4 == 0) && (y % 100 != 0)) || (y % 400 == 0)) {
						ml[1] = 29;
					}
					if (d == ml[m - 1]) {
						m++;
						d = 1;
					} else
						d++;
				}
			}
		}

		int partition(int n, int l, int m) {// n - sum, l - length, m - every
											// part
			// <= m
			if (n < l) return 0;
			if (n < l + 2) return 1;
			if (l == 1) return 1;
			int c = 0;
			for (int i = Math.min(n - l + 1, m); i >= (n + l - 1) / l; i--) {
				c += partition(n - i, l - 1, i);
			}
			return c;
		}

		int rifmQuality(String a, String b) {
			if (a.length() > b.length()) {
				String c = a;
				a = b;
				b = c;
			}
			int c = 0, d = b.length() - a.length();
			for (int i = a.length() - 1; i >= 0; i--) {
				if (a.charAt(i) == b.charAt(i + d)) c++;
				else
					break;
			}
			return c;
		}

		String numSym = "0123456789ABCDEF";

		String ZFromXToYNotation(int x, int y, String z) {
			if (z.equals("0")) return "0";
			String a = "";
			// long q = 0, t = 1;
			BigInteger q = BigInteger.ZERO, t = BigInteger.ONE;
			for (int i = z.length() - 1; i >= 0; i--) {
				q = q.add(t.multiply(BigInteger.valueOf(z.charAt(i) - 48)));
				t = t.multiply(BigInteger.valueOf(x));
			}
			while (q.compareTo(BigInteger.ZERO) == 1) {
				a = numSym.charAt((int) (q.mod(BigInteger.valueOf(y)).intValue())) + a;
				q = q.divide(BigInteger.valueOf(y));
			}
			return a;
		}

		double angleFromXY(int x, int y) {
			if ((x == 0) && (y > 0)) return Math.PI / 2;
			if ((x == 0) && (y < 0)) return -Math.PI / 2;
			if ((y == 0) && (x > 0)) return 0;
			if ((y == 0) && (x < 0)) return Math.PI;
			if (x > 0) return Math.atan((double) y / x);
			else {
				if (y > 0) return Math.atan((double) y / x) + Math.PI;
				else
					return Math.atan((double) y / x) - Math.PI;
			}
		}

		static boolean isNumber(String x) {
			try {
				Integer.parseInt(x);
			} catch (NumberFormatException ex) {
				return false;
			}
			return true;
		}

		static boolean stringContainsOf(String x, String c) {
			for (int i = 0; i < x.length(); i++) {
				if (c.indexOf(x.charAt(i)) == -1) return false;
			}
			return true;
		}

		long pow(long a, long n) { // b > 0
			if (n == 0) return 1;
			long k = n, b = 1, c = a;
			while (k != 0) {
				if (k % 2 == 0) {
					k /= 2;
					c *= c;
				} else {
					k--;
					b *= c;
				}
			}
			return b;
		}

		int pow(int a, int n) { // b > 0
			if (n == 0) return 1;
			int k = n, b = 1, c = a;
			while (k != 0) {
				if (k % 2 == 0) {
					k /= 2;
					c *= c;
				} else {
					k--;
					b *= c;
				}
			}
			return b;
		}

		double pow(double a, int n) { // b > 0
			if (n == 0) return 1;
			double k = n, b = 1, c = a;
			while (k != 0) {
				if (k % 2 == 0) {
					k /= 2;
					c *= c;
				} else {
					k--;
					b *= c;
				}
			}
			return b;
		}

		double log2(double x) {
			return Math.log(x) / Math.log(2);
		}

		int lpd(int[] primes, int x) {// least prime divisor
			int i;
			for (i = 0; primes[i] <= x / 2; i++) {
				if (x % primes[i] == 0) {
					return primes[i];
				}
			}
			;
			return x;
		}

		int np(int[] primes, int x) {// number of prime number
			for (int i = 0; true; i++) {
				if (primes[i] == x) return i;
			}
		}

		int[] dijkstra(int[][] map, int n, int s) {
			int[] p = new int[n];
			boolean[] b = new boolean[n];
			Arrays.fill(p, Integer.MAX_VALUE);
			p[s] = 0;
			b[s] = true;
			for (int i = 0; i < n; i++) {
				if (i != s) p[i] = map[s][i];
			}
			while (true) {
				int m = Integer.MAX_VALUE, mi = -1;
				for (int i = 0; i < n; i++) {
					if (!b[i] && (p[i] < m)) {
						mi = i;
						m = p[i];
					}
				}
				if (mi == -1) break;
				b[mi] = true;
				for (int i = 0; i < n; i++)
					if (p[mi] + map[mi][i] < p[i]) p[i] = p[mi] + map[mi][i];
			}
			return p;
		}

		boolean isLatinChar(char x) {
			if (((x >= 'a') && (x <= 'z')) || ((x >= 'A') && (x <= 'Z'))) return true;
			else
				return false;
		}

		boolean isBigLatinChar(char x) {
			if (x >= 'A' && x <= 'Z') return true;
			else
				return false;
		}

		boolean isSmallLatinChar(char x) {
			if (x >= 'a' && x <= 'z') return true;
			else
				return false;
		}

		boolean isDigitChar(char x) {
			if (x >= '0' && x <= '9') return true;
			else
				return false;
		}

		class NotANumberException extends Exception {
			private static final long serialVersionUID = 1L;
			String mistake;

			NotANumberException() {
				mistake = "Unknown.";
			}

			NotANumberException(String message) {
				mistake = message;
			}
		}

		class Real {
			String num = "0";
			long exp = 0;
			boolean pos = true;

			long length() {
				return num.length();
			}

			void check(String x) throws NotANumberException {
				if (!stringContainsOf(x, "0123456789+-.eE")) throw new NotANumberException("Illegal character.");
				long j = 0;
				for (long i = 0; i < x.length(); i++) {
					if ((x.charAt((int) i) == '-') || (x.charAt((int) i) == '+')) {
						if (j == 0) j = 1;
						else
							if (j == 5) j = 6;
							else
								throw new NotANumberException("Unexpected sign.");
					} else
						if ("0123456789".indexOf(x.charAt((int) i)) != -1) {
							if (j == 0) j = 2;
							else
								if (j == 1) j = 2;
								else
									if (j == 2)
									;
									else
										if (j == 3) j = 4;
										else
											if (j == 4)
											;
											else
												if (j == 5) j = 6;
												else
													if (j == 6)
													;
													else
														throw new NotANumberException("Unexpected digit.");
						} else
							if (x.charAt((int) i) == '.') {
								if (j == 0) j = 3;
								else
									if (j == 1) j = 3;
									else
										if (j == 2) j = 3;
										else
											throw new NotANumberException("Unexpected dot.");
							} else
								if ((x.charAt((int) i) == 'e') || (x.charAt((int) i) == 'E')) {
									if (j == 2) j = 5;
									else
										if (j == 4) j = 5;
										else
											throw new NotANumberException("Unexpected exponent.");
								} else
									throw new NotANumberException("O_o.");
				}
				if ((j == 0) || (j == 1) || (j == 3) || (j == 5)) throw new NotANumberException("Unexpected end.");
			}

			public Real(String x) throws NotANumberException {
				check(x);
				if (x.charAt(0) == '-') pos = false;
				long j = 0;
				String e = "";
				boolean epos = true;
				for (long i = 0; i < x.length(); i++) {
					if ("0123456789".indexOf(x.charAt((int) i)) != -1) {
						if (j == 0) num += x.charAt((int) i);
						if (j == 1) {
							num += x.charAt((int) i);
							exp--;
						}
						if (j == 2) e += x.charAt((int) i);
					}
					if (x.charAt((int) i) == '.') {
						if (j == 0) j = 1;
					}
					if ((x.charAt((int) i) == 'e') || (x.charAt((int) i) == 'E')) {
						j = 2;
						if (x.charAt((int) (i + 1)) == '-') epos = false;
					}
				}
				while ((num.length() > 1) && (num.charAt(0) == '0'))
					num = num.substring(1);
				while ((num.length() > 1) && (num.charAt(num.length() - 1) == '0')) {
					num = num.substring(0, num.length() - 1);
					exp++;
				}
				if (num.equals("0")) {
					exp = 0;
					pos = true;
					return;
				}
				while ((e.length() > 1) && (e.charAt(0) == '0'))
					e = e.substring(1);
				try {
					if (e != "") if (epos) exp += Long.parseLong(e);
					else
						exp -= Long.parseLong(e);
				} catch (NumberFormatException exc) {
					if (!epos) {
						num = "0";
						exp = 0;
						pos = true;
					} else {
						throw new NotANumberException("Too long exponent");
					}
				}
			}

			public Real() {
			}

			String toString(long mantissa) {
				String a = "", b = "";
				if (exp >= 0) {
					a = num;
					if (!pos) a = '-' + a;
					for (long i = 0; i < exp; i++)
						a += '0';
					for (long i = 0; i < mantissa; i++)
						b += '0';
					if (mantissa == 0) return a;
					else
						return a + "." + b;
				} else {
					if (exp + length() <= 0) {
						a = "0";
						if (mantissa == 0) {
							return a;
						}
						if (mantissa < -(exp + length() - 1)) {
							for (long i = 0; i < mantissa; i++)
								b += '0';
							return a + "." + b;
						} else {
							if (!pos) a = '-' + a;
							for (long i = 0; i < mantissa; i++)
								if (i < -(exp + length())) b += '0';
								else
									if (i + exp >= 0) b += '0';
									else
										b += num.charAt((int) (i + exp + length()));
							return a + "." + b;
						}
					} else {
						if (!pos) a = "-";
						for (long i = 0; i < exp + length(); i++)
							a += num.charAt((int) i);
						if (mantissa == 0) return a;
						for (long i = exp + length(); i < exp + length() + mantissa; i++)
							if (i < length()) b += num.charAt((int) i);
							else
								b += '0';
						return a + "." + b;
					}
				}
			}
		}

		boolean containsRepeats(int... num) {
			Set<Integer> s = new TreeSet<Integer>();
			for (int d : num)
				if (!s.contains(d)) s.add(d);
				else
					return true;
			return false;
		}

		int[] rotateDice(int[] a, int n) {
			int[] c = new int[6];
			if (n == 0) {
				c[0] = a[1];
				c[1] = a[5];
				c[2] = a[2];
				c[3] = a[0];
				c[4] = a[4];
				c[5] = a[3];
			}
			if (n == 1) {
				c[0] = a[2];
				c[1] = a[1];
				c[2] = a[5];
				c[3] = a[3];
				c[4] = a[0];
				c[5] = a[4];
			}
			if (n == 2) {
				c[0] = a[3];
				c[1] = a[0];
				c[2] = a[2];
				c[3] = a[5];
				c[4] = a[4];
				c[5] = a[1];
			}
			if (n == 3) {
				c[0] = a[4];
				c[1] = a[1];
				c[2] = a[0];
				c[3] = a[3];
				c[4] = a[5];
				c[5] = a[2];
			}
			if (n == 4) {
				c[0] = a[0];
				c[1] = a[2];
				c[2] = a[3];
				c[3] = a[4];
				c[4] = a[1];
				c[5] = a[5];
			}
			if (n == 5) {
				c[0] = a[0];
				c[1] = a[4];
				c[2] = a[1];
				c[3] = a[2];
				c[4] = a[3];
				c[5] = a[5];
			}
			return c;
		}

		int min(int... a) {
			int c = Integer.MAX_VALUE;
			for (int d : a)
				if (d < c) c = d;
			return c;
		}

		int max(int... a) {
			int c = Integer.MIN_VALUE;
			for (int d : a)
				if (d > c) c = d;
			return c;
		}

		int[] normalizeDice(int[] a) {
			int[] c = a.clone();
			if (c[0] != 0) if (c[1] == 0) c = rotateDice(c, 0);
			else
				if (c[2] == 0) c = rotateDice(c, 1);
				else
					if (c[3] == 0) c = rotateDice(c, 2);
					else
						if (c[4] == 0) c = rotateDice(c, 3);
						else
							if (c[5] == 0) c = rotateDice(rotateDice(c, 0), 0);
			while (c[1] != min(c[1], c[2], c[3], c[4]))
				c = rotateDice(c, 4);
			return c;
		}

		boolean sameDice(int[] a, int[] b) {
			for (int i = 0; i < 6; i++)
				if (a[i] != b[i]) return false;
			return true;
		}

		final double goldenRatio = (1 + Math.sqrt(5)) / 2;
		final double aGoldenRatio = (1 - Math.sqrt(5)) / 2;

		long Fib(int n) {
			if (n < 0) if (n % 2 == 0) return -Math.round((pow(goldenRatio, -n) - pow(aGoldenRatio, -n)) / Math.sqrt(5));
			else
				return -Math.round((pow(goldenRatio, -n) - pow(aGoldenRatio, -n)) / Math.sqrt(5));
			return Math.round((pow(goldenRatio, n) - pow(aGoldenRatio, n)) / Math.sqrt(5));
		}

		class japaneeseComparator implements Comparator<String> {
			@Override
			public int compare(String a, String b) {
				int ai = 0, bi = 0;
				boolean m = false, ns = false;
				if (a.charAt(ai) <= '9' && a.charAt(ai) >= '0') {
					if (b.charAt(bi) <= '9' && b.charAt(bi) >= '0') m = true;
					else
						return -1;
				}
				if (b.charAt(bi) <= '9' && b.charAt(bi) >= '0') {
					if (a.charAt(ai) <= '9' && a.charAt(ai) >= '0') m = true;
					else
						return 1;
				}
				a += "!";
				b += "!";
				int na = 0, nb = 0;
				while (true) {
					if (a.charAt(ai) == '!') {
						if (b.charAt(bi) == '!') break;
						return -1;
					}
					if (b.charAt(bi) == '!') {
						return 1;
					}
					if (m) {
						int ab = -1, bb = -1;
						while (a.charAt(ai) <= '9' && a.charAt(ai) >= '0') {
							if (ab == -1) ab = ai;
							ai++;
						}
						while (b.charAt(bi) <= '9' && b.charAt(bi) >= '0') {
							if (bb == -1) bb = bi;
							bi++;
						}
						m = !m;
						if (ab == -1) {
							if (bb == -1) continue;
							else
								return 1;
						}
						if (bb == -1) return -1;
						while (a.charAt(ab) == '0' && ab + 1 != ai) {
							ab++;
							if (!ns) na++;
						}
						while (b.charAt(bb) == '0' && bb + 1 != bi) {
							bb++;
							if (!ns) nb++;
						}
						if (na != nb) ns = true;
						if (ai - ab < bi - bb) return -1;
						if (ai - ab > bi - bb) return 1;
						for (int i = 0; i < ai - ab; i++) {
							if (a.charAt(ab + i) < b.charAt(bb + i)) return -1;
							if (a.charAt(ab + i) > b.charAt(bb + i)) return 1;
						}
					} else {
						m = !m;
						while (true) {
							if (a.charAt(ai) <= 'z' && a.charAt(ai) >= 'a' && b.charAt(bi) <= 'z' && b.charAt(bi) >= 'a') {
								if (a.charAt(ai) < b.charAt(bi)) return -1;
								if (a.charAt(ai) > b.charAt(bi)) return 1;
								ai++;
								bi++;
							} else
								if (a.charAt(ai) <= 'z' && a.charAt(ai) >= 'a') return 1;
								else
									if (b.charAt(bi) <= 'z' && b.charAt(bi) >= 'a') return -1;
									else
										break;
						}
					}
				}
				if (na < nb) return 1;
				if (na > nb) return -1;
				return 0;
			}
		}

		Random random = new Random();
	}

	StreamTokenizer in;
	PrintWriter out;
	boolean oj;
	BufferedReader br;

	void init() throws IOException {
		oj = System.getProperty("ONLINE_JUDGE") != null;
		Reader reader = oj ? new InputStreamReader(System.in) : new FileReader("input.txt");
		Writer writer = oj ? new OutputStreamWriter(System.out) : new FileWriter("output.txt");
		br = new BufferedReader(reader);
		in = new StreamTokenizer(br);
		out = new PrintWriter(writer);
	}

	long selectionTime = 0;

	void startSelection() {
		selectionTime -= System.currentTimeMillis();
	}

	void stopSelection() {
		selectionTime += System.currentTimeMillis();
	}

	void run() throws IOException {
		long beginTime = System.currentTimeMillis();
		long beginMem = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();
		init();
		solve();
		long endMem = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();
		long endTime = System.currentTimeMillis();
		if (!oj) {
			System.out.println("Memory used = " + (endMem - beginMem));
			System.out.println("Total memory = " + (Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()));
			System.out.println("Running time = " + (endTime - beginTime));
		}
		out.flush();
	}

	int nextInt() throws IOException {
		in.nextToken();
		return (int) in.nval;
	}

	long nextLong() throws IOException {
		in.nextToken();
		return (long) in.nval;
	}

	String nextString() throws IOException {
		in.nextToken();
		return in.sval;
	}

	double nextDouble() throws IOException {
		in.nextToken();
		return in.nval;
	}

	myLib lib = new myLib();

	void solve() throws IOException {
		int n = nextInt();
		int[] a = new int[n];
		int o = 0, nn = 0;
		for (int i = 0; i < n; i++) {
			a[i] = nextInt();
			if (a[i] < 0) o++;
			if (a[i] != 0) nn++;
		}
		if (n == 1) {
			out.print(a[0]);
			return;
		}
		Arrays.sort(a);
		if (o % 2 == 1) {
			for (int i = 1; i < n; i++)
				if (a[i] != 0 || nn == 0)
					out.print(a[i] + " ");
		} else {
			for (int i = 0; i < n; i++)
				if (a[i] != 0 || nn == 0)
					out.print(a[i] + " ");
		}
	}
}