P1538 Welcoming Spring Ball: Number Dance

Background

The students of HNSDFZ are preparing a ball to celebrate the Spring Festival.

Description

In an era that emphasizes cooperation, people pay more attention to collective formations than to individual dance moves. To match the annual countdown, the students decide to form a “Number Dance.” As the name suggests, everyone lines up together to form several digits -___-||||. Even more creatively, everyone lies on the ground to ensure everything stays strictly horizontal and vertical. Now, given the digits and the required display size, please write a program to simulate the students’ elegant formations.

Input Format

The first line contains $k$. The value $k$ indicates the size of the digits to be displayed. The second line is a string consisting entirely of digits, i.e., the digits to be displayed.

Output Format

Output as required. See the sample.

Explanation/Hint

Constraints - For all testdata, $k \le 30$, $0 < |s| \le 255$. - Except for the first digit, there is 1 space before each subsequent digit, and all digits must be aligned. It is recommended to print directly and not store the output. If you have questions about the size and $k$, please use your own understanding. Translated by ChatGPT 5