import java.util.*;
public class Main{
public static void main(String[] args){
Scanner scanner = new Scanner(System.in);
String str = scanner.nextLine();
System.out.println(SentenceRevers(str));
}
public static String SentenceRevers(String s){
String[] inStringArray = s.split(" ");
StringBuilder sb = new StringBuilder();
for(int i = inStringArray.length - 1;i >= 0;i--){
sb.append(inStringArray[i] + " ");
}
return sb.toString().trim();
}
}