JDCC '16 Contest 3 P2 - The Number Eight

View as PDF

Submit solution


Points: 3
Time limit: 2.0s
Memory limit: 64M

Author:
Problem type

George, an eight year old boy, is in love with the number 8. Last year his favourite number was seven, and next year it will likely be nine, but right now, it's eight. He is obsessed with eights of all different sizes and he spends hours drawing figure 8 shapes on paper.

However, George only has 8 \times 3 hours in a day, so he has asked you to create a program that will draw 8s for him.

Input

Each test case contains one integer H (5 \le H \le 1 005, H \bmod 2 = 1), the height of the 8 to be drawn.

Output

Output an 8 of corresponding height following the specification exemplified by the sample input/output.

Sample Input

5

Sample Output

***
* *
***
* *
***

Sample Input

7

Sample Output

****
*  *
*  *
****
*  *
*  *
****

Sample Input

9

Sample Output

*****
*   *
*   *
*   *
*****
*   *
*   *
*   *
*****

Comments

There are no comments at the moment.