import java.util.Scanner;
/**
* HJ13 句子逆序
*/
public class HJ013 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String line = sc.nextLine();
String[] array = line.split(" ");
for (int i = array.length - 1; i >= 0; i--) {
System.out.print(array[i] + " ");
}
sc.close();
}
}