import java.util.*;  
class  Main{
   public static void main(String[] args){
   	
   	Scanner input = new Scanner(System.in);
   	int n = input.nextInt();//入力文字数決定
   
        // 文字列を List へ追加
        List<String> list = new ArrayList<String>();
        for (int i = 0; i < n; i++) {
        	String s = input.next();
            list.add(s);
        }
   		list.toString();

        // 昇順にソート
        Collections.reverse(list);
			String separator = " ";
        // List の文字列を StringBuilder に追加
        StringBuilder sb = new StringBuilder();
        for (String str : list) {
        	if(sb.length() > 0){
        		sb.append(separator);
        	}
            sb.append(str);
        }
   	System.out.println(sb.toString());
   }
} import java.util.*; util.* java class  Main{
   public static void main(String[] args){
   	
   	Scanner input = new Scanner(System.in);
   	int n = input.nextInt();//入力文字数決定
   
        // 文字列を List へ追加
        List<String> list = new ArrayList<String>();
        for (int i = 0; i < n; i++) {
        	String s = input.next();
            list.add(s);
        }
   		list.toString();

        // 昇順にソート
        Collections.reverse(list);
			String separator = " ";
        // List の文字列を StringBuilder に追加
        StringBuilder sb = new StringBuilder();
        for (String str : list) {
        	if(sb.length() > 0){
        		sb.append(separator);
        	}
            sb.append(str);
        }
   	System.out.println(sb.toString());
   }
} Main public static void main(String[] args){
   	
   	Scanner input = new Scanner(System.in);
   	int n = input.nextInt();//入力文字数決定
   
        // 文字列を List へ追加
        List<String> list = new ArrayList<String>();
        for (int i = 0; i < n; i++) {
        	String s = input.next();
            list.add(s);
        }
   		list.toString();

        // 昇順にソート
        Collections.reverse(list);
			String separator = " ";
        // List の文字列を StringBuilder に追加
        StringBuilder sb = new StringBuilder();
        for (String str : list) {
        	if(sb.length() > 0){
        		sb.append(separator);
        	}
            sb.append(str);
        }
   	System.out.println(sb.toString());
   } main {
   	
   	Scanner input = new Scanner(System.in);
   	int n = input.nextInt();//入力文字数決定
   
        // 文字列を List へ追加
        List<String> list = new ArrayList<String>();
        for (int i = 0; i < n; i++) {
        	String s = input.next();
            list.add(s);
        }
   		list.toString();

        // 昇順にソート
        Collections.reverse(list);
			String separator = " ";
        // List の文字列を StringBuilder に追加
        StringBuilder sb = new StringBuilder();
        for (String str : list) {
        	if(sb.length() > 0){
        		sb.append(separator);
        	}
            sb.append(str);
        }
   	System.out.println(sb.toString());
   } Scanner input = new Scanner(System.in); input new Scanner(System.in) int n = input.nextInt(); n input.nextInt() input.nextInt input List<String> list = new ArrayList<String>(); list new ArrayList<String>() for (int i = 0; i < n; i++) {
        	String s = input.next();
            list.add(s);
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
        	String s = input.next();
            list.add(s);
        } {
        	String s = input.next();
            list.add(s);
        } String s = input.next(); s input.next() input.next input list.add(s) list.add list s list.toString() list.toString list Collections.reverse(list) Collections.reverse Collections list String separator = " "; separator " " StringBuilder sb = new StringBuilder(); sb new StringBuilder() for (String str : list) {
        	if(sb.length() > 0){
        		sb.append(separator);
        	}
            sb.append(str);
        } String str list {
        	if(sb.length() > 0){
        		sb.append(separator);
        	}
            sb.append(str);
        } {
        	if(sb.length() > 0){
        		sb.append(separator);
        	}
            sb.append(str);
        } if(sb.length() > 0){
        		sb.append(separator);
        	} sb.length() > 0 sb.length() sb.length sb 0 {
        		sb.append(separator);
        	} sb.append(separator) sb.append sb separator sb.append(str) sb.append sb str System.out.println(sb.toString()) System.out.println System.out System System.out sb.toString() sb.toString sb String[] args args
import java.util.*;  
class  Main{
   public static void main(String[] args){
   	
   	Scanner input = new Scanner(System.in);
   	int n = input.nextInt();//入力文字数決定
   
        // 文字列を List へ追加
        List<String> list = new ArrayList<String>();
        for (int i = 0; i < n; i++) {
        	String s = input.next();
            list.add(s);
        }
   		list.toString();

        // 昇順にソート
        Collections.reverse(list);
			String separator = " ";
        // List の文字列を StringBuilder に追加
        StringBuilder sb = new StringBuilder();
        for (String str : list) {
        	if(sb.length() > 0){
        		sb.append(separator);
        	}
            sb.append(str);
        }
   	System.out.println(sb.toString());
   }
}