#P427. 【例74.2】 古风排版

【例74.2】 古风排版

Description

In ancient China, people wrote text vertically from right to left. Please write a program to format a given string in this ancient style.

Input Format

The first line contains a positive integer NN, the number of characters per column. The second line contains a non-empty string of length not exceeding 10001000, ending with a newline. 1N10001≤N≤1000.

Output Format

Format the given string in the ancient style, with NN characters per column (except possibly the last column, which may have fewer than NN characters).

Sample

4
This is a test case
asa T
st ih
e tsi
 ce s