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 scan = new Scanner(System.in);
		int n = scan.nextInt();
		if (n <= 100) {
			List<Integer> list = new ArrayList<>();
			for (int i = 0; i < n; i++) {
				int ai = scan.nextInt();
				if (ai >= 0 && ai < 1000) {
					list.add(ai);
				}
			}
			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 scan = new Scanner(System.in);
		int n = scan.nextInt();
		if (n <= 100) {
			List<Integer> list = new ArrayList<>();
			for (int i = 0; i < n; i++) {
				int ai = scan.nextInt();
				if (ai >= 0 && ai < 1000) {
					list.add(ai);
				}
			}
			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 scan = new Scanner(System.in);
		int n = scan.nextInt();
		if (n <= 100) {
			List<Integer> list = new ArrayList<>();
			for (int i = 0; i < n; i++) {
				int ai = scan.nextInt();
				if (ai >= 0 && ai < 1000) {
					list.add(ai);
				}
			}
			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 scan = new Scanner(System.in);
		int n = scan.nextInt();
		if (n <= 100) {
			List<Integer> list = new ArrayList<>();
			for (int i = 0; i < n; i++) {
				int ai = scan.nextInt();
				if (ai >= 0 && ai < 1000) {
					list.add(ai);
				}
			}
			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 scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan if (n <= 100) {
			List<Integer> list = new ArrayList<>();
			for (int i = 0; i < n; i++) {
				int ai = scan.nextInt();
				if (ai >= 0 && ai < 1000) {
					list.add(ai);
				}
			}
			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) + " ");
				}
			}
		} n <= 100 n 100 {
			List<Integer> list = new ArrayList<>();
			for (int i = 0; i < n; i++) {
				int ai = scan.nextInt();
				if (ai >= 0 && ai < 1000) {
					list.add(ai);
				}
			}
			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) + " ");
				}
			}
		} List<Integer> list = new ArrayList<>(); list new ArrayList<>() for (int i = 0; i < n; i++) {
				int ai = scan.nextInt();
				if (ai >= 0 && ai < 1000) {
					list.add(ai);
				}
			} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
				int ai = scan.nextInt();
				if (ai >= 0 && ai < 1000) {
					list.add(ai);
				}
			} {
				int ai = scan.nextInt();
				if (ai >= 0 && ai < 1000) {
					list.add(ai);
				}
			} int ai = scan.nextInt(); ai scan.nextInt() scan.nextInt scan if (ai >= 0 && ai < 1000) {
					list.add(ai);
				} ai >= 0 && ai < 1000 ai >= 0 ai 0 ai < 1000 ai 1000 {
					list.add(ai);
				} list.add(ai) list.add list ai 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 scan = new Scanner(System.in);
		int n = scan.nextInt();
		if (n <= 100) {
			List<Integer> list = new ArrayList<>();
			for (int i = 0; i < n; i++) {
				int ai = scan.nextInt();
				if (ai >= 0 && ai < 1000) {
					list.add(ai);
				}
			}
			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 scan = new Scanner(System.in);
		int n = scan.nextInt();
		if (n <= 100) {
			List<Integer> list = new ArrayList<>();
			for (int i = 0; i < n; i++) {
				int ai = scan.nextInt();
				if (ai >= 0 && ai < 1000) {
					list.add(ai);
				}
			}
			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 scan = new Scanner(System.in);
		int n = scan.nextInt();
		if (n <= 100) {
			List<Integer> list = new ArrayList<>();
			for (int i = 0; i < n; i++) {
				int ai = scan.nextInt();
				if (ai >= 0 && ai < 1000) {
					list.add(ai);
				}
			}
			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) + " ");
				}
			}
		}
	}
}