//
// main.c
// practice
//
// Created by Chen on 2018/6/24.
// Copyright © 2018年 Chen. All rights reserved.
//
#include <stdio.h>
#include <math.h>
void print1(int);//begin with #
void print2(int);//begin with .
int main(int argc, const char * argv[]) {
int n;
while (scanf("%d",&n)!=EOF&&n!=0) {
int i,j,k;
for (i=1; i<=8; i++) {
if(i%2==1){
for(j=1;j<=n;j++){
print1(n);
}
}else{
for(k=1;k<=n;k++){
print2(n);
}
}
}
}
return 0;
}
void print1(int n){
int i,j,k;
for(i=1;i<=8;i++){
if(i%2==1){
for (j=1;j<=n; j++) {
printf("#");
}
}else{
for (k=1;k<=n ; k++) {
printf(".");
}
}
}
printf("\n");
}
void print2(int n){
int i,j,k;
for(i=1;i<=8;i++){
if(i%2==1){
for (j=1;j<=n; j++) {
printf(".");
}
}else{
for (k=1;k<=n ; k++) {
printf("#");
}
}
}
printf("\n");
}