#include <iostream>
#include <string>
#include <cstring>
#include <cmath>
using namespace std; int main(){
//initialize for positive number
char h[][];
strcpy(h[], "*****..***..*...*.*****...*...*.*****.*****.***...*****.*...*");
strcpy(h[], "*.....*...*.*...*.*.......*...*.*...*...*...*..*..*...*..*.*.");
strcpy(h[], "*****.*****.*...*.***.....*****.*****...*...*...*.*...*...*..");
strcpy(h[], "....*.*...*..*.*..*.......*...*.*.*.....*...*..*..*...*...*..");
strcpy(h[], "*****.*...*...*...*****...*...*.*..**.*****.***...*****...*.."); //initialize for negative number
char v[][];
strcpy(v[], "*****");
strcpy(v[], "*....");
strcpy(v[], "*****");
strcpy(v[], "....*");
strcpy(v[], "*****");
strcpy(v[], ".....");
strcpy(v[], ".***.");
strcpy(v[], "*...*");
strcpy(v[], "*****");
strcpy(v[], "*...*");
strcpy(v[],"*...*");
strcpy(v[],".....");
strcpy(v[],"*...*");
strcpy(v[],"*...*");
strcpy(v[],"*...*");
strcpy(v[],".*.*.");
strcpy(v[],"..*..");
strcpy(v[],".....");
strcpy(v[],"*****");
strcpy(v[],"*....");
strcpy(v[],"***..");
strcpy(v[],"*....");
strcpy(v[],"*****");
strcpy(v[],".....");
strcpy(v[],".....");
strcpy(v[],".....");
strcpy(v[],"*...*");
strcpy(v[],"*...*");
strcpy(v[],"*****");
strcpy(v[],"*...*");
strcpy(v[],"*...*");
strcpy(v[],".....");
strcpy(v[],"*****");
strcpy(v[],"*...*");
strcpy(v[],"*****");
strcpy(v[],"*.*..");
strcpy(v[],"*..**");
strcpy(v[],".....");
strcpy(v[],"*****");
strcpy(v[],"..*..");
strcpy(v[],"..*..");
strcpy(v[],"..*..");
strcpy(v[],"*****");
strcpy(v[],".....");
strcpy(v[],"***..");
strcpy(v[],"*..*.");
strcpy(v[],"*...*");
strcpy(v[],"*..*.");
strcpy(v[],"***..");
strcpy(v[],".....");
strcpy(v[],"*****");
strcpy(v[],"*...*");
strcpy(v[],"*...*");
strcpy(v[],"*...*");
strcpy(v[],"*****");
strcpy(v[],".....");
strcpy(v[],"*...*");
strcpy(v[],".*.*.");
strcpy(v[],"..*..");
strcpy(v[],"..*..");
strcpy(v[],"..*.."); bool flag = false, pos;
int n, m, i, j, k;
while (cin >> n){
if (n == ) break;
if (flag)
cout << endl << endl; flag = true;
pos = true;
if (n < ){
pos = false;
n = abs(n);
}
//output for positive number
if (pos){
for (i = ; i < ; ++i){
m = ;
while (m < n){
for (j = ; h[i][j]; ++j){
k = ;
while (k < n){
cout << h[i][j];
++k;
}
}
++m;
cout << endl;
}
}
}
else{
for (i = ; i < ; ++i){
m = ;
while (m < n){
for (j = ; v[i][j]; ++j){
k = ;
while (k < n){
cout << v[i][j];
++k;
}
}
++m;
cout << endl;
}
}
}
}
cout << endl << endl;
return ;
}
//画图题,直接打表
#include <stdio.h> char h[][] =
{
"*****..***..**.*******.*****.*****.********.**",
"*..**.**.*.**.****..*..**..*.*.",
"*****.*****.**.***..*****.********.***..",
".*.**..*.*..*.**.*.*..**..*..***..",
"*****.**********.*..**.*****.*********.."
}; char v[][] =
{
"*****",
"*.",
"*****",
".*",
"*****",
"..",
".***.",
"**",
"*****",
"**",
"**",
"..",
"**",
"**",
"**",
".*.*.",
"..*..",
"..",
"*****",
"*.",
"***..",
"*.",
"*****",
"..",
"..",
"..",
"**",
"**",
"*****",
"**",
"**",
"..",
"*****",
"**",
"*****",
"*.*..",
"*..**",
"..",
"*****",
"..*..",
"..*..",
"..*..",
"*****",
"..",
"***..",
"*..*.",
"**",
"*..*.",
"***..",
"..",
"*****",
"**",
"**",
"**",
"*****",
"..",
"**",
".*.*.",
"..*..",
"..*..",
"..*.."
}; void draw(int n)
{
if(n < )
{
n = -n;
for(int i = ; i < * n; i++)
{
for(int j = ; j < * n; j++)
{
printf("%c", v[i / n][j / n]);
}
printf("\n");
}
}
else
{
for(int i = ; i < * n; i++)
{
for(int j = ; j < * n; j++)
{
printf("%c", h[i / n][j / n]);
}
printf("\n");
}
}
printf("\n\n");
} int main()
{
int n;
while(scanf("%d", &n), n) draw(n);
return ;
}