str = input().split(' ')#将输入的字符串以空格分割 for i in str: assert(i.isalpha())#判断列表每一个元素是否为字母,如果有不是字母的就会报错 print(' '.join(str[::-1]))#逆序打印