string = input() print(string[-1] + string[1:-1] + string[0])