#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
while(cin>>n){
if(n==0) break;
else if(n==1){
printf("#.#.#.#.\n");
printf(".#.#.#.#\n");
printf("#.#.#.#.\n");
printf(".#.#.#.#\n");
printf("#.#.#.#.\n");
printf(".#.#.#.#\n");
printf("#.#.#.#.\n");
printf(".#.#.#.#\n");
}
else if(n==2){
printf("##..##..##..##..\n");
printf("##..##..##..##..\n");
printf("..##..##..##..##\n");
printf("..##..##..##..##\n");
printf("##..##..##..##..\n");
printf("##..##..##..##..\n");
printf("..##..##..##..##\n");
printf("..##..##..##..##\n");
printf("##..##..##..##..\n");
printf("##..##..##..##..\n");
printf("..##..##..##..##\n");
printf("..##..##..##..##\n");
printf("##..##..##..##..\n");
printf("##..##..##..##..\n");
printf("..##..##..##..##\n");
printf("..##..##..##..##\n");
}
else if(n==3){
printf("###...###...###...###...\n");
printf("###...###...###...###...\n");
printf("###...###...###...###...\n");
printf("...###...###...###...###\n");
printf("...###...###...###...###\n");
printf("...###...###...###...###\n");
printf("###...###...###...###...\n");
printf("###...###...###...###...\n");
printf("###...###...###...###...\n");
printf("...###...###...###...###\n");
printf("...###...###...###...###\n");
printf("...###...###...###...###\n");
printf("###...###...###...###...\n");
printf("###...###...###...###...\n");
printf("###...###...###...###...\n");
printf("...###...###...###...###\n");
printf("...###...###...###...###\n");
printf("...###...###...###...###\n");
printf("###...###...###...###...\n");
printf("###...###...###...###...\n");
printf("###...###...###...###...\n");
printf("...###...###...###...###\n");
printf("...###...###...###...###\n");
printf("...###...###...###...###\n");
}
else if(n==4){
printf("####....####....####....####....\n");
printf("####....####....####....####....\n");
printf("####....####....####....####....\n");
printf("####....####....####....####....\n");
printf("....####....####....####....####\n");
printf("....####....####....####....####\n");
printf("....####....####....####....####\n");
printf("....####....####....####....####\n");
printf("####....####....####....####....\n");
printf("####....####....####....####....\n");
printf("####....####....####....####....\n");
printf("####....####....####....####....\n");
printf("....####....####....####....####\n");
printf("....####....####....####....####\n");
printf("....####....####....####....####\n");
printf("....####....####....####....####\n");
printf("####....####....####....####....\n");
printf("####....####....####....####....\n");
printf("####....####....####....####....\n");
printf("####....####....####....####....\n");
printf("....####....####....####....####\n");
printf("....####....####....####....####\n");
printf("....####....####....####....####\n");
printf("....####....####....####....####\n");
printf("####....####....####....####....\n");
printf("####....####....####....####....\n");
printf("####....####....####....####....\n");
printf("####....####....####....####....\n");
printf("....####....####....####....####\n");
printf("....####....####....####....####\n");
printf("....####....####....####....####\n");
printf("....####....####....####....####\n");
}
else if(n==5){
printf("#####.....#####.....#####.....#####.....\n");
printf("#####.....#####.....#####.....#####.....\n");
printf("#####.....#####.....#####.....#####.....\n");
printf("#####.....#####.....#####.....#####.....\n");
printf("#####.....#####.....#####.....#####.....\n");
printf(".....#####.....#####.....#####.....#####\n");
printf(".....#####.....#####.....#####.....#####\n");
printf(".....#####.....#####.....#####.....#####\n");
printf(".....#####.....#####.....#####.....#####\n");
printf(".....#####.....#####.....#####.....#####\n");
printf("#####.....#####.....#####.....#####.....\n");
printf("#####.....#####.....#####.....#####.....\n");
printf("#####.....#####.....#####.....#####.....\n");
printf("#####.....#####.....#####.....#####.....\n");
printf("#####.....#####.....#####.....#####.....\n");
printf(".....#####.....#####.....#####.....#####\n");
printf(".....#####.....#####.....#####.....#####\n");
printf(".....#####.....#####.....#####.....#####\n");
printf(".....#####.....#####.....#####.....#####\n");
printf(".....#####.....#####.....#####.....#####\n");
printf("#####.....#####.....#####.....#####.....\n");
printf("#####.....#####.....#####.....#####.....\n");
printf("#####.....#####.....#####.....#####.....\n");
printf("#####.....#####.....#####.....#####.....\n");
printf("#####.....#####.....#####.....#####.....\n");
printf(".....#####.....#####.....#####.....#####\n");
printf(".....#####.....#####.....#####.....#####\n");
printf(".....#####.....#####.....#####.....#####\n");
printf(".....#####.....#####.....#####.....#####\n");
printf(".....#####.....#####.....#####.....#####\n");
printf("#####.....#####.....#####.....#####.....\n");
printf("#####.....#####.....#####.....#####.....\n");
printf("#####.....#####.....#####.....#####.....\n");
printf("#####.....#####.....#####.....#####.....\n");
printf("#####.....#####.....#####.....#####.....\n");
printf(".....#####.....#####.....#####.....#####\n");
printf(".....#####.....#####.....#####.....#####\n");
printf(".....#####.....#####.....#####.....#####\n");
printf(".....#####.....#####.....#####.....#####\n");
printf(".....#####.....#####.....#####.....#####\n");
}
else if(n==6){
printf("######......######......######......######......\n");
printf("######......######......######......######......\n");
printf("######......######......######......######......\n");
printf("######......######......######......######......\n");
printf("######......######......######......######......\n");
printf("######......######......######......######......\n");
printf("......######......######......######......######\n");
printf("......######......######......######......######\n");
printf("......######......######......######......######\n");
printf("......######......######......######......######\n");
printf("......######......######......######......######\n");
printf("......######......######......######......######\n");
printf("######......######......######......######......\n");
printf("######......######......######......######......\n");
printf("######......######......######......######......\n");
printf("######......######......######......######......\n");
printf("######......######......######......######......\n");
printf("######......######......######......######......\n");
printf("......######......######......######......######\n");
printf("......######......######......######......######\n");
printf("......######......######......######......######\n");
printf("......######......######......######......######\n");
printf("......######......######......######......######\n");
printf("......######......######......######......######\n");
printf("######......######......######......######......\n");
printf("######......######......######......######......\n");
printf("######......######......######......######......\n");
printf("######......######......######......######......\n");
printf("######......######......######......######......\n");
printf("######......######......######......######......\n");
printf("......######......######......######......######\n");
printf("......######......######......######......######\n");
printf("......######......######......######......######\n");
printf("......######......######......######......######\n");
printf("......######......######......######......######\n");
printf("......######......######......######......######\n");
printf("######......######......######......######......\n");
printf("######......######......######......######......\n");
printf("######......######......######......######......\n");
printf("######......######......######......######......\n");
printf("######......######......######......######......\n");
printf("######......######......######......######......\n");
printf("......######......######......######......######\n");
printf("......######......######......######......######\n");
printf("......######......######......######......######\n");
printf("......######......######......######......######\n");
printf("......######......######......######......######\n");
printf("......######......######......######......######\n");
}
else if(n==7){
printf("#######.......#######.......#######.......#######.......\n");
printf("#######.......#######.......#######.......#######.......\n");
printf("#######.......#######.......#######.......#######.......\n");
printf("#######.......#######.......#######.......#######.......\n");
printf("#######.......#######.......#######.......#######.......\n");
printf("#######.......#######.......#######.......#######.......\n");
printf("#######.......#######.......#######.......#######.......\n");
printf(".......#######.......#######.......#######.......#######\n");
printf(".......#######.......#######.......#######.......#######\n");
printf(".......#######.......#######.......#######.......#######\n");
printf(".......#######.......#######.......#######.......#######\n");
printf(".......#######.......#######.......#######.......#######\n");
printf(".......#######.......#######.......#######.......#######\n");
printf(".......#######.......#######.......#######.......#######\n");
printf("#######.......#######.......#######.......#######.......\n");
printf("#######.......#######.......#######.......#######.......\n");
printf("#######.......#######.......#######.......#######.......\n");
printf("#######.......#######.......#######.......#######.......\n");
printf("#######.......#######.......#######.......#######.......\n");
printf("#######.......#######.......#######.......#######.......\n");
printf("#######.......#######.......#######.......#######.......\n");
printf(".......#######.......#######.......#######.......#######\n");
printf(".......#######.......#######.......#######.......#######\n");
printf(".......#######.......#######.......#######.......#######\n");
printf(".......#######.......#######.......#######.......#######\n");
printf(".......#######.......#######.......#######.......#######\n");
printf(".......#######.......#######.......#######.......#######\n");
printf(".......#######.......#######.......#######.......#######\n");
printf("#######.......#######.......#######.......#######.......\n");
printf("#######.......#######.......#######.......#######.......\n");
printf("#######.......#######.......#######.......#######.......\n");
printf("#######.......#######.......#######.......#######.......\n");
printf("#######.......#######.......#######.......#######.......\n");
printf("#######.......#######.......#######.......#######.......\n");
printf("#######.......#######.......#######.......#######.......\n");
printf(".......#######.......#######.......#######.......#######\n");
printf(".......#######.......#######.......#######.......#######\n");
printf(".......#######.......#######.......#######.......#######\n");
printf(".......#######.......#######.......#######.......#######\n");
printf(".......#######.......#######.......#######.......#######\n");
printf(".......#######.......#######.......#######.......#######\n");
printf(".......#######.......#######.......#######.......#######\n");
printf("#######.......#######.......#######.......#######.......\n");
printf("#######.......#######.......#######.......#######.......\n");
printf("#######.......#######.......#######.......#######.......\n");
printf("#######.......#######.......#######.......#######.......\n");
printf("#######.......#######.......#######.......#######.......\n");
printf("#######.......#######.......#######.......#######.......\n");
printf("#######.......#######.......#######.......#######.......\n");
printf(".......#######.......#######.......#######.......#######\n");
printf(".......#######.......#######.......#######.......#######\n");
printf(".......#######.......#######.......#######.......#######\n");
printf(".......#######.......#######.......#######.......#######\n");
printf(".......#######.......#######.......#######.......#######\n");
printf(".......#######.......#######.......#######.......#######\n");
printf(".......#######.......#######.......#######.......#######\n");
}
else if(n==8){
printf("########........########........########........########........\n");
printf("########........########........########........########........\n");
printf("########........########........########........########........\n");
printf("########........########........########........########........\n");
printf("########........########........########........########........\n");
printf("########........########........########........########........\n");
printf("########........########........########........########........\n");
printf("########........########........########........########........\n");
printf("........########........########........########........########\n");
printf("........########........########........########........########\n");
printf("........########........########........########........########\n");
printf("........########........########........########........########\n");
printf("........########........########........########........########\n");
printf("........########........########........########........########\n");
printf("........########........########........########........########\n");
printf("........########........########........########........########\n");
printf("########........########........########........########........\n");
printf("########........########........########........########........\n");
printf("########........########........########........########........\n");
printf("########........########........########........########........\n");
printf("########........########........########........########........\n");
printf("########........########........########........########........\n");
printf("########........########........########........########........\n");
printf("########........########........########........########........\n");
printf("........########........########........########........########\n");
printf("........########........########........########........########\n");
printf("........########........########........########........########\n");
printf("........########........########........########........########\n");
printf("........########........########........########........########\n");
printf("........########........########........########........########\n");
printf("........########........########........########........########\n");
printf("........########........########........########........########\n");
printf("########........########........########........########........\n");
printf("########........########........########........########........\n");
printf("########........########........########........########........\n");
printf("########........########........########........########........\n");
printf("########........########........########........########........\n");
printf("########........########........########........########........\n");
printf("########........########........########........########........\n");
printf("########........########........########........########........\n");
printf("........########........########........########........########\n");
printf("........########........########........########........########\n");
printf("........########........########........########........########\n");
printf("........########........########........########........########\n");
printf("........########........########........########........########\n");
printf("........########........########........########........########\n");
printf("........########........########........########........########\n");
printf("........########........########........########........########\n");
printf("########........########........########........########........\n");
printf("########........########........########........########........\n");
printf("########........########........########........########........\n");
printf("########........########........########........########........\n");
printf("########........########........########........########........\n");
printf("########........########........########........########........\n");
printf("########........########........########........########........\n");
printf("########........########........########........########........\n");
printf("........########........########........########........########\n");
printf("........########........########........########........########\n");
printf("........########........########........########........########\n");
printf("........########........########........########........########\n");
printf("........########........########........########........########\n");
printf("........########........########........########........########\n");
printf("........########........########........########........########\n");
printf("........########........########........########........########\n");
}
}
}