LearnPy Hub
← Arena
IntermediateRating 1200

Centred Text

Centre each line in a frame of * whose width is the longest line plus 4. If a line can't be centred exactly, put the extra space on the right.

Input

n, then n lines.

Output

The framed text.

Sample 1

Input
2
Hello
Python world
Output
****************
*    Hello     *
* Python world *
****************

Sample 2

Input
1
x
Output
*****
* x *
*****
solution.py
Output appears here
Centred Text · Python Arena problem · LearnPy Hub