530B.md (903B)
1 Source: https://codeforces.com/problemset/problem/530/B 2 3 B. String inside out 4 5 time limit per test 6 7 2 seconds 8 9 memory limit per test 10 11 256 megabytes 12 13 input 14 15 standard input 16 17 output 18 19 standard output 20 21 You are given a string *S* of even length *s*1..*s*2*n* . Perform the following manipulations: 22 23 * divide it into two halves *s*1..*s**n* and *s**n* + 1..*s*2*n* 24 * reverse each of them *s**n*..*s*1 and *s*2*n*..*s**n* + 1 25 * concatenate the resulting strings into *s**n*..*s*1*s*2*n*..*s**n* + 1 26 27 Output the result of these manipulations. 28 29 Input 30 31 The 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. 32 33 Output 34 35 Output the string which is the result of the described manipulations. 36 37 Examples 38 39 Input 40 41 ``` 42 codeforces 43 ``` 44 45 Output 46 47 ``` 48 fedocsecro 49 ``` 50 51 Input 52 53 ``` 54 qwertyasdfgh 55 ``` 56 57 Output 58 59 ``` 60 ytrewqhgfdsa 61 ```