#两行解决 字符串转列表并以空格分开,倒序输出并将列表转字符串
n = input().split()
print(str(n[::-1]).replace("[","").replace("]","").replace(",","").replace("'", ""))