import java.util.Scanner;
public class Solution {
public static char[][] array;
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int str=0;
int n = scan.nextInt();
array = new char[n][n];
for(int i=0; i<n; i++){
for(int j=0; j<n; j++){
if ((i+j)%2==0)
{
array[i][j]='#';
}
else if(i%2==1){
if(j%2==1)
{
array[i][j]='#';
}
}
}
}
for(int i=0; i<array.length; i++){
str = str + 1;
if (str>1){
System.out.println("");}
for(int j=0; j<array.length; j++){
System.out.print(array[i][j]);
}
}
}
}
package com.javarush.task.jdk13.task06.task0634;
import java.util.Scanner;
public class Solution {
public static char[][] array;
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int str=0;
int n = scan.nextInt();
array = new char[n][n];
for(int i=0; i<n; i++){
for(int j=0; j<n; j++){
if ((i+j)%2==0)
{
array[i][j]='#';
}
else if(i%2==1){
if(j%2==1)
{
array[i][j]='#';
}
}
}
}
for(int i=0; i<array.length; i++){
str = str + 1;
if (str>1){
System.out.println("");}
for(int j=0; j<array.length; j++){
System.out.print(array[i][j]);
}
}
}
}