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

public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int num = scanner.nextInt();
		if (num <= 100) {
			int array[] = new int[num];
			List<Integer> list = new ArrayList<Integer>();
			for (int i = 0; i < array.length; i++) {
				int next = scanner.nextInt();
				if (0 <= next && next < 1000) {
					list.add(next);
				}
			}
			Collections.reverse(list);

			for (int i = 0; i < list.size(); i++) {
				if (i == (list.size()-1)) {
					System.out.println(list.get(i));
				} else {
					System.out.print(list.get(i) + " ");
				}
			}
		}
	}
} import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int num = scanner.nextInt();
		if (num <= 100) {
			int array[] = new int[num];
			List<Integer> list = new ArrayList<Integer>();
			for (int i = 0; i < array.length; i++) {
				int next = scanner.nextInt();
				if (0 <= next && next < 1000) {
					list.add(next);
				}
			}
			Collections.reverse(list);

			for (int i = 0; i < list.size(); i++) {
				if (i == (list.size()-1)) {
					System.out.println(list.get(i));
				} else {
					System.out.print(list.get(i) + " ");
				}
			}
		}
	}
} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int num = scanner.nextInt();
		if (num <= 100) {
			int array[] = new int[num];
			List<Integer> list = new ArrayList<Integer>();
			for (int i = 0; i < array.length; i++) {
				int next = scanner.nextInt();
				if (0 <= next && next < 1000) {
					list.add(next);
				}
			}
			Collections.reverse(list);

			for (int i = 0; i < list.size(); i++) {
				if (i == (list.size()-1)) {
					System.out.println(list.get(i));
				} else {
					System.out.print(list.get(i) + " ");
				}
			}
		}
	} main {
		Scanner scanner = new Scanner(System.in);
		int num = scanner.nextInt();
		if (num <= 100) {
			int array[] = new int[num];
			List<Integer> list = new ArrayList<Integer>();
			for (int i = 0; i < array.length; i++) {
				int next = scanner.nextInt();
				if (0 <= next && next < 1000) {
					list.add(next);
				}
			}
			Collections.reverse(list);

			for (int i = 0; i < list.size(); i++) {
				if (i == (list.size()-1)) {
					System.out.println(list.get(i));
				} else {
					System.out.print(list.get(i) + " ");
				}
			}
		}
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int num = scanner.nextInt(); num scanner.nextInt() scanner.nextInt scanner if (num <= 100) {
			int array[] = new int[num];
			List<Integer> list = new ArrayList<Integer>();
			for (int i = 0; i < array.length; i++) {
				int next = scanner.nextInt();
				if (0 <= next && next < 1000) {
					list.add(next);
				}
			}
			Collections.reverse(list);

			for (int i = 0; i < list.size(); i++) {
				if (i == (list.size()-1)) {
					System.out.println(list.get(i));
				} else {
					System.out.print(list.get(i) + " ");
				}
			}
		} num <= 100 num 100 {
			int array[] = new int[num];
			List<Integer> list = new ArrayList<Integer>();
			for (int i = 0; i < array.length; i++) {
				int next = scanner.nextInt();
				if (0 <= next && next < 1000) {
					list.add(next);
				}
			}
			Collections.reverse(list);

			for (int i = 0; i < list.size(); i++) {
				if (i == (list.size()-1)) {
					System.out.println(list.get(i));
				} else {
					System.out.print(list.get(i) + " ");
				}
			}
		} int array[] = new int[num]; array new int[num] num List<Integer> list = new ArrayList<Integer>(); list new ArrayList<Integer>() for (int i = 0; i < array.length; i++) {
				int next = scanner.nextInt();
				if (0 <= next && next < 1000) {
					list.add(next);
				}
			} int i = 0; int i = 0; i 0 i < array.length i array.length array array.length i++ i++ i {
				int next = scanner.nextInt();
				if (0 <= next && next < 1000) {
					list.add(next);
				}
			} {
				int next = scanner.nextInt();
				if (0 <= next && next < 1000) {
					list.add(next);
				}
			} int next = scanner.nextInt(); next scanner.nextInt() scanner.nextInt scanner if (0 <= next && next < 1000) {
					list.add(next);
				} 0 <= next && next < 1000 0 <= next 0 next next < 1000 next 1000 {
					list.add(next);
				} list.add(next) list.add list next Collections.reverse(list) Collections.reverse Collections list for (int i = 0; i < list.size(); i++) {
				if (i == (list.size()-1)) {
					System.out.println(list.get(i));
				} else {
					System.out.print(list.get(i) + " ");
				}
			} int i = 0; int i = 0; i 0 i < list.size() i list.size() list.size list i++ i++ i {
				if (i == (list.size()-1)) {
					System.out.println(list.get(i));
				} else {
					System.out.print(list.get(i) + " ");
				}
			} {
				if (i == (list.size()-1)) {
					System.out.println(list.get(i));
				} else {
					System.out.print(list.get(i) + " ");
				}
			} if (i == (list.size()-1)) {
					System.out.println(list.get(i));
				} else {
					System.out.print(list.get(i) + " ");
				} i == (list.size()-1) i (list.size()-1) list.size() list.size list 1 {
					System.out.println(list.get(i));
				} System.out.println(list.get(i)) System.out.println System.out System System.out list.get(i) list.get list i {
					System.out.print(list.get(i) + " ");
				} System.out.print(list.get(i) + " ") System.out.print System.out System System.out list.get(i) + " " list.get(i) list.get list i " " String[] args args public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int num = scanner.nextInt();
		if (num <= 100) {
			int array[] = new int[num];
			List<Integer> list = new ArrayList<Integer>();
			for (int i = 0; i < array.length; i++) {
				int next = scanner.nextInt();
				if (0 <= next && next < 1000) {
					list.add(next);
				}
			}
			Collections.reverse(list);

			for (int i = 0; i < list.size(); i++) {
				if (i == (list.size()-1)) {
					System.out.println(list.get(i));
				} else {
					System.out.print(list.get(i) + " ");
				}
			}
		}
	}
} public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int num = scanner.nextInt();
		if (num <= 100) {
			int array[] = new int[num];
			List<Integer> list = new ArrayList<Integer>();
			for (int i = 0; i < array.length; i++) {
				int next = scanner.nextInt();
				if (0 <= next && next < 1000) {
					list.add(next);
				}
			}
			Collections.reverse(list);

			for (int i = 0; i < list.size(); i++) {
				if (i == (list.size()-1)) {
					System.out.println(list.get(i));
				} else {
					System.out.print(list.get(i) + " ");
				}
			}
		}
	}
} Main
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int num = scanner.nextInt();
		if (num <= 100) {
			int array[] = new int[num];
			List<Integer> list = new ArrayList<Integer>();
			for (int i = 0; i < array.length; i++) {
				int next = scanner.nextInt();
				if (0 <= next && next < 1000) {
					list.add(next);
				}
			}
			Collections.reverse(list);

			for (int i = 0; i < list.size(); i++) {
				if (i == (list.size()-1)) {
					System.out.println(list.get(i));
				} else {
					System.out.print(list.get(i) + " ");
				}
			}
		}
	}
}