import java.util.*; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); char[] arrs = scanner.nextLine().toCharArray(); int length = arrs.length; int start = 0; while(start<length){ int end = start; while(end<length && arrs[end] != ' '){end++;} for(int j=start;j<(start + end)/2;j++){ char temp = arrs[j]; arrs[j] = arrs[end+start-1-j]; arrs[end+start-1-j] = temp; } start = end+1; } for(int i=0;i<length;i++){ System.out.print(arrs[i]); } } }