Character Switch

View as PDF

Submit solution

Points: 1
Time limit: 2.0s
Memory limit: 64M

Author:
Problem type
Allowed languages
Java, Python

Write a program that takes a string of length at least two as input and then prints a string formed by exchanging the first and last characters in the string provided.

Input

A String of length 2 or more.

Output

A new String that has the first and last characters switched.

Sample Input

red

Sample Output

der

Comments

There are no comments at the moment.