#35. 字符串首尾添加字符

    ID: 35 Type: Default 1000ms 256MiB Tried: 0 Accepted: 0 Difficulty: (None) Uploaded By: Tags>codingbatWarmup-1gesp3字符串

字符串首尾添加字符

Add Character to Front and Back of String

Background

This is a simple problem about string manipulation.

Problem Description

Given a string, take its last character and return a new string with the last character added at the front and back. For example, "cat" yields "tcatt". The original string will be of length 11 or more.

Input Format

Input is given from standard input in the following format.

A string.

Output Format

Output is printed to standard output in the following format.

The modified string.

Sample

cat
"tcatt"
Hello
"oHelloo"
a
"aaa"

Sample Explanation

For the first sample, the last character of the string "cat" is 't'. Adding it to the front and back of "cat" results in "tcatt". For the second sample, the last character of the string "Hello" is 'o'. Adding it to the front and back of "Hello" results in "oHelloo". For the third sample, the last character of the string "a" is 'a'. Adding it to the front and back of "a" results in "aaa".

Constraints

Time limit: 11 second, Memory limit: 10241024 KiB for each test case.