Welcome to ZOJ
 Problem Sets Information Select Problem Runs Ranklist
ZOJ Problem Set - 3839
Poker Face

Time Limit: 2 Seconds      Memory Limit: 65536 KB

As is known to all, coders are lack of exercise and Kato is one of them. In order to get fit, he decides to go mining in MINECRAFT. However, it is always dangerous in the mine because there are a lot of ZOMBIEs in MINECRAFT. They kill Kato time and time again when he is mining. But this time, Kato is in invincible mode and wants to observe what the ZOMBIEs' faces are like. After his obervation, he found that the ZOMBIEs' faces are regular. Now he provides you the ZOMBIEs' faces of size 8, 16 and 32, it is your task to draw the other ZOMBIEs. You should find the recursive pattern from the small cases and learn to draw bigger cases.

#### Input

There are multiple test cases. For each case there is only a number N (8 ≤ N≤ 1024, N is a power of 2), which is size of the ZOMBIE's face. The input ends with an integer less than eight.

#### Output

For each case, output the image of the ZOMBIE's face. And print an empty line after each case.

#### Sample Input

8
16
32
0


#### Sample Output

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

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

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



#### Hint

The sample out put is the ZOMBIE's face of size 8, 16, 32.


Author: ZHU, Heming
Source: ZOJ Monthly, November 2014
Submit    Status