#k. XHXMMMl3P0dEWg#$&!^
XHXMMMl3P0dEWg#$&!^
该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。
Statement
Polycarp loves ciphers. He has invented his own cipher called Right-Left.
Right-Left cipher is used for strings. To encrypt the string Polycarp uses the following algorithm:
- he writes down ,
- he appends the current word with (i.e. writes down to the right of the current result),
- he prepends the current word with (i.e. writes down to the left of the current result),
- he appends the current word with (i.e. writes down to the right of the current result),
- he prepends the current word with (i.e. writes down to the left of the current result),
- and so on for each position until the end of .
For example, if ="techno" the process is: "t" "te" "cte" "cteh" "ncteh" "ncteho". So the encrypted ="techno" is "ncteho".
Given string — the result of encryption of some string . Your task is to decrypt it, i.e. find the string .
Format
Input
The only line of the input contains — the result of encryption of some string . It contains only lowercase Latin letters. The length of is between and , inclusive.
Output
Print such string that after encryption it equals .
Sample
ncteho
techno
erfdcoeocs
codeforces
z
z
ShanghaiTech ACM 炸鱼杯
- 状态
- 已结束
- 规则
- OI
- 题目
- 46
- 开始于
- 2024-12-10 23:00
- 结束于
- 2024-12-15 13:00
- 持续时间
- 110 小时
- 主持人
- 参赛人数
- 112