# Python Program to Form a New String where the First Character and the Last Character have been Exchanged 
 def change(string):
      return string[-1:] + string[1:-1] + string[:1]
string=raw_input("Enter string:")
print("Modified string:")
print(change(string))