P29696 [洛谷] [COCI2013-2014#2] SLOM
普及
题目描述

Problem Description

Martin's eyes are having issues.

For a word, each time he blinks, the letters of the word undergo the following changes (the terms "last $k$-th", "first $k$-th", etc., refer to the word before the change):

  • The last letter moves to between the first and second letters.
  • The second-to-last letter moves to between the second and third letters.
  • $\ldots\ \ldots$
  • The $k$-th last letter moves to between the $k$-th and $(k+1)$-th letters.

For example, the word $\tt$ will become $\tt$ after he blinks.

If Martin blinks again, the same transformation will occur.

Given the number of times Martin blinks, $X$, and the word $s$ he sees, find the original word.

Input Format

The first line contains an integer $X$, the number of times Martin blinks.

The second line contains a string $s$, the word Martin sees.

Output Format

Output a single line containing the original word.

Sample Input and Output

Sample Input #1

4 
acefdb

Sample Output #1

abcdef

Sample Input #2

1000 
aaaaaa

Sample Output #2

aaaaaa

Sample Input #3

11 
srama

Sample Output #3

sarma

Notes

Sample 1 Explanation

The transformation process is: $\tt abcdef\to afbecd\to adfcbe\to aedbfc\to$.

Data Constraints

  • For $50\%$ of the data, $1 \le X \le 100$.
  • For $100\%$ of the data, $1 \le X \le 10^9$, $3 \le |s| \le 10^3$.

Source

This problem is translated from COCI2013-2014 CONTEST 2 T3 SLOM.

According to the original problem data configuration, this problem is worth $100$ points.

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
4 acefdb
样例输出
abcdef