#1119
Unrated
SLOM
시간 제한
1s
메모리 제한
32MB
제출
0
정답
0
맞힌 사람
0
정답 비율
0.0%

문제

Author: Marin Tomić

Little Marin spent all his day generating test data for COCI. He simply couldn't make it work, so he had a nervous breakdown and can't even see clearly anymore. Every time he blinks while reading, the letters in a word get mixed up so that the letters from the second half of the word (the shorter half, if the length is an odd number) "jump in" between the letters from the first half in the following way:

  • the last letter "jumps in" between the first and the second letter

  • the penultimate letter "jumps in" between the second and the third letter

  • the kth letter from the end "jumps in" between the kth and the (k+1)th letter from the beginning

For example, the word "abcdef" would become "afbecd" after blinking. If Marin blinks again, the same thing happens. After two blinks, the word "abcdef" becomes "adfcbe".

Marin has decided to write a program to help him determine what's exactly written on the screen. Unfortunately, after a day's work, he's simply too tired and he needs your help. You are given X, the number of blinks, and the word Marin sees on the screen. Write a program to solve the mystery for Marin and determine what was actually the word before he blinked X times.

입력

The first line of input contains a positive integer X (1 ≤ X ≤ 1 000 000 000), the number of times Marin blinked. The second line of input contains the word from the screen, its length being from the interval [3, 1000]. The word will consist only from small letters of English alphabet.

출력

The first and only line of output must contain the original word, before Marin blinked X times.

예제 입력 1

4
acefdb

예제 출력 1

abcdef

예제 입력 2

1000
aaaaaa

예제 출력 2

aaaaaa

예제 입력 3

11
srama

예제 출력 3

sarma
코드 제출

코드를 제출하려면 로그인이 필요합니다.

로그인
내 제출
제출 내역이 없습니다.
맞은 사람
아직 맞은 사람이 없습니다.
난이도 투표
Unrated0명 투표
로그인 후 AC 받으면 투표할 수 있습니다.
전체 제출
제출 내역이 없습니다.