import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.nextLine();
        String[] sr = s.split(" ");
        StringBuilder[] sb = new StringBuilder[sr.length];
        for(int i = 0; i<sr.length; i++){
            sb[i] = new StringBuilder(sr[i]);
        }
        for(int j = 0; j<sr.length; j++){
            System.out.print(sb[sr.length-1-j].reverse().toString()+" ");
        }
    }
}