302729: CF530B. String inside out
Memory Limit:256 MB
Time Limit:2 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
B. String inside outtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output
You are given a string S of even length s1..s2n . Perform the following manipulations:
- divide it into two halves s1..sn and sn + 1..s2n
- reverse each of them sn..s1 and s2n..sn + 1
- concatenate the resulting strings into sn..s1s2n..sn + 1
Output the result of these manipulations.
InputThe only line of the input contains a string of lowercase Latin letters. The length of the string is between 2 and 20, inclusive, and it is even.
OutputOutput the string which is the result of the described manipulations.
ExamplesInputcodeforcesOutput
fedocsecroInput
qwertyasdfghOutput
ytrewqhgfdsa