import java.util.Scanner;


public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int[][]hw = new int[10000][2];

		int h = 1;
		int w = 1;

		//何セット分入力したか
		int count = 0;

		for (int i = 0; h != 0 || w != 0; i++) {

			String line = sc.nextLine();
			String[]HW = line.split(" ");
			h = Integer.parseInt(HW[0]);
			w = Integer.parseInt(HW[1]);

			hw[i][0] = h;
			hw[i][1] = w;

			count++;
		}



		//これで高さと横をint型で出せるようになった
		for (int i = 0; i < count-1 ; i++) {


			StringBuilder x = new StringBuilder();

			for (int j = 0; j < hw[i][1]; j++) {

				if (j == 0 || j%2 == 0 ) {
					x.append("#");
				} else {
					x.append(".");
				}

			}

			String z = x.toString();


			StringBuilder a = new StringBuilder();

			for (int j = 0; j < hw[i][1]; j++) {

				if (j == 0 || j%2 == 0 ) {
					a.append(".");
				} else {
					a.append("#");
				}

			}

			String b = a.toString();

			for (int j = 0; j < hw[i][0]; j++) {
				if (j == 0 || j%2 == 0) {
					System.out.println(z);
				} else {
					System.out.println(b);
				}
			}



			System.out.println("");
		}


	}

}
 import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int[][]hw = new int[10000][2];

		int h = 1;
		int w = 1;

		//何セット分入力したか
		int count = 0;

		for (int i = 0; h != 0 || w != 0; i++) {

			String line = sc.nextLine();
			String[]HW = line.split(" ");
			h = Integer.parseInt(HW[0]);
			w = Integer.parseInt(HW[1]);

			hw[i][0] = h;
			hw[i][1] = w;

			count++;
		}



		//これで高さと横をint型で出せるようになった
		for (int i = 0; i < count-1 ; i++) {


			StringBuilder x = new StringBuilder();

			for (int j = 0; j < hw[i][1]; j++) {

				if (j == 0 || j%2 == 0 ) {
					x.append("#");
				} else {
					x.append(".");
				}

			}

			String z = x.toString();


			StringBuilder a = new StringBuilder();

			for (int j = 0; j < hw[i][1]; j++) {

				if (j == 0 || j%2 == 0 ) {
					a.append(".");
				} else {
					a.append("#");
				}

			}

			String b = a.toString();

			for (int j = 0; j < hw[i][0]; j++) {
				if (j == 0 || j%2 == 0) {
					System.out.println(z);
				} else {
					System.out.println(b);
				}
			}



			System.out.println("");
		}


	}

} Main public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int[][]hw = new int[10000][2];

		int h = 1;
		int w = 1;

		//何セット分入力したか
		int count = 0;

		for (int i = 0; h != 0 || w != 0; i++) {

			String line = sc.nextLine();
			String[]HW = line.split(" ");
			h = Integer.parseInt(HW[0]);
			w = Integer.parseInt(HW[1]);

			hw[i][0] = h;
			hw[i][1] = w;

			count++;
		}



		//これで高さと横をint型で出せるようになった
		for (int i = 0; i < count-1 ; i++) {


			StringBuilder x = new StringBuilder();

			for (int j = 0; j < hw[i][1]; j++) {

				if (j == 0 || j%2 == 0 ) {
					x.append("#");
				} else {
					x.append(".");
				}

			}

			String z = x.toString();


			StringBuilder a = new StringBuilder();

			for (int j = 0; j < hw[i][1]; j++) {

				if (j == 0 || j%2 == 0 ) {
					a.append(".");
				} else {
					a.append("#");
				}

			}

			String b = a.toString();

			for (int j = 0; j < hw[i][0]; j++) {
				if (j == 0 || j%2 == 0) {
					System.out.println(z);
				} else {
					System.out.println(b);
				}
			}



			System.out.println("");
		}


	} main {

		Scanner sc = new Scanner(System.in);
		int[][]hw = new int[10000][2];

		int h = 1;
		int w = 1;

		//何セット分入力したか
		int count = 0;

		for (int i = 0; h != 0 || w != 0; i++) {

			String line = sc.nextLine();
			String[]HW = line.split(" ");
			h = Integer.parseInt(HW[0]);
			w = Integer.parseInt(HW[1]);

			hw[i][0] = h;
			hw[i][1] = w;

			count++;
		}



		//これで高さと横をint型で出せるようになった
		for (int i = 0; i < count-1 ; i++) {


			StringBuilder x = new StringBuilder();

			for (int j = 0; j < hw[i][1]; j++) {

				if (j == 0 || j%2 == 0 ) {
					x.append("#");
				} else {
					x.append(".");
				}

			}

			String z = x.toString();


			StringBuilder a = new StringBuilder();

			for (int j = 0; j < hw[i][1]; j++) {

				if (j == 0 || j%2 == 0 ) {
					a.append(".");
				} else {
					a.append("#");
				}

			}

			String b = a.toString();

			for (int j = 0; j < hw[i][0]; j++) {
				if (j == 0 || j%2 == 0) {
					System.out.println(z);
				} else {
					System.out.println(b);
				}
			}



			System.out.println("");
		}


	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int[][]hw = new int[10000][2]; hw new int[10000][2] 10000 2 int h = 1; h 1 int w = 1; w 1 int count = 0; count 0 for (int i = 0; h != 0 || w != 0; i++) {

			String line = sc.nextLine();
			String[]HW = line.split(" ");
			h = Integer.parseInt(HW[0]);
			w = Integer.parseInt(HW[1]);

			hw[i][0] = h;
			hw[i][1] = w;

			count++;
		} int i = 0; int i = 0; i 0 h != 0 || w != 0 h != 0 h 0 w != 0 w 0 i++ i++ i {

			String line = sc.nextLine();
			String[]HW = line.split(" ");
			h = Integer.parseInt(HW[0]);
			w = Integer.parseInt(HW[1]);

			hw[i][0] = h;
			hw[i][1] = w;

			count++;
		} {

			String line = sc.nextLine();
			String[]HW = line.split(" ");
			h = Integer.parseInt(HW[0]);
			w = Integer.parseInt(HW[1]);

			hw[i][0] = h;
			hw[i][1] = w;

			count++;
		} String line = sc.nextLine(); line sc.nextLine() sc.nextLine sc String[]HW = line.split(" "); HW line.split(" ") line.split line " " h = Integer.parseInt(HW[0]) h Integer.parseInt(HW[0]) Integer.parseInt Integer HW[0] HW 0 w = Integer.parseInt(HW[1]) w Integer.parseInt(HW[1]) Integer.parseInt Integer HW[1] HW 1 hw[i][0] = h hw[i][0] hw[i] hw i 0 h hw[i][1] = w hw[i][1] hw[i] hw i 1 w count++ count for (int i = 0; i < count-1 ; i++) {


			StringBuilder x = new StringBuilder();

			for (int j = 0; j < hw[i][1]; j++) {

				if (j == 0 || j%2 == 0 ) {
					x.append("#");
				} else {
					x.append(".");
				}

			}

			String z = x.toString();


			StringBuilder a = new StringBuilder();

			for (int j = 0; j < hw[i][1]; j++) {

				if (j == 0 || j%2 == 0 ) {
					a.append(".");
				} else {
					a.append("#");
				}

			}

			String b = a.toString();

			for (int j = 0; j < hw[i][0]; j++) {
				if (j == 0 || j%2 == 0) {
					System.out.println(z);
				} else {
					System.out.println(b);
				}
			}



			System.out.println("");
		} int i = 0; int i = 0; i 0 i < count-1 i count-1 count 1 i++ i++ i {


			StringBuilder x = new StringBuilder();

			for (int j = 0; j < hw[i][1]; j++) {

				if (j == 0 || j%2 == 0 ) {
					x.append("#");
				} else {
					x.append(".");
				}

			}

			String z = x.toString();


			StringBuilder a = new StringBuilder();

			for (int j = 0; j < hw[i][1]; j++) {

				if (j == 0 || j%2 == 0 ) {
					a.append(".");
				} else {
					a.append("#");
				}

			}

			String b = a.toString();

			for (int j = 0; j < hw[i][0]; j++) {
				if (j == 0 || j%2 == 0) {
					System.out.println(z);
				} else {
					System.out.println(b);
				}
			}



			System.out.println("");
		} {


			StringBuilder x = new StringBuilder();

			for (int j = 0; j < hw[i][1]; j++) {

				if (j == 0 || j%2 == 0 ) {
					x.append("#");
				} else {
					x.append(".");
				}

			}

			String z = x.toString();


			StringBuilder a = new StringBuilder();

			for (int j = 0; j < hw[i][1]; j++) {

				if (j == 0 || j%2 == 0 ) {
					a.append(".");
				} else {
					a.append("#");
				}

			}

			String b = a.toString();

			for (int j = 0; j < hw[i][0]; j++) {
				if (j == 0 || j%2 == 0) {
					System.out.println(z);
				} else {
					System.out.println(b);
				}
			}



			System.out.println("");
		} StringBuilder x = new StringBuilder(); x new StringBuilder() for (int j = 0; j < hw[i][1]; j++) {

				if (j == 0 || j%2 == 0 ) {
					x.append("#");
				} else {
					x.append(".");
				}

			} int j = 0; int j = 0; j 0 j < hw[i][1] j hw[i][1] hw[i] hw i 1 j++ j++ j {

				if (j == 0 || j%2 == 0 ) {
					x.append("#");
				} else {
					x.append(".");
				}

			} {

				if (j == 0 || j%2 == 0 ) {
					x.append("#");
				} else {
					x.append(".");
				}

			} if (j == 0 || j%2 == 0 ) {
					x.append("#");
				} else {
					x.append(".");
				} j == 0 || j%2 == 0 j == 0 j 0 j%2 == 0 j%2 j 2 0 {
					x.append("#");
				} x.append("#") x.append x "#" {
					x.append(".");
				} x.append(".") x.append x "." String z = x.toString(); z x.toString() x.toString x StringBuilder a = new StringBuilder(); a new StringBuilder() for (int j = 0; j < hw[i][1]; j++) {

				if (j == 0 || j%2 == 0 ) {
					a.append(".");
				} else {
					a.append("#");
				}

			} int j = 0; int j = 0; j 0 j < hw[i][1] j hw[i][1] hw[i] hw i 1 j++ j++ j {

				if (j == 0 || j%2 == 0 ) {
					a.append(".");
				} else {
					a.append("#");
				}

			} {

				if (j == 0 || j%2 == 0 ) {
					a.append(".");
				} else {
					a.append("#");
				}

			} if (j == 0 || j%2 == 0 ) {
					a.append(".");
				} else {
					a.append("#");
				} j == 0 || j%2 == 0 j == 0 j 0 j%2 == 0 j%2 j 2 0 {
					a.append(".");
				} a.append(".") a.append a "." {
					a.append("#");
				} a.append("#") a.append a "#" String b = a.toString(); b a.toString() a.toString a for (int j = 0; j < hw[i][0]; j++) {
				if (j == 0 || j%2 == 0) {
					System.out.println(z);
				} else {
					System.out.println(b);
				}
			} int j = 0; int j = 0; j 0 j < hw[i][0] j hw[i][0] hw[i] hw i 0 j++ j++ j {
				if (j == 0 || j%2 == 0) {
					System.out.println(z);
				} else {
					System.out.println(b);
				}
			} {
				if (j == 0 || j%2 == 0) {
					System.out.println(z);
				} else {
					System.out.println(b);
				}
			} if (j == 0 || j%2 == 0) {
					System.out.println(z);
				} else {
					System.out.println(b);
				} j == 0 || j%2 == 0 j == 0 j 0 j%2 == 0 j%2 j 2 0 {
					System.out.println(z);
				} System.out.println(z) System.out.println System.out System System.out z {
					System.out.println(b);
				} System.out.println(b) System.out.println System.out System System.out b System.out.println("") System.out.println System.out System System.out "" String[] args args public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int[][]hw = new int[10000][2];

		int h = 1;
		int w = 1;

		//何セット分入力したか
		int count = 0;

		for (int i = 0; h != 0 || w != 0; i++) {

			String line = sc.nextLine();
			String[]HW = line.split(" ");
			h = Integer.parseInt(HW[0]);
			w = Integer.parseInt(HW[1]);

			hw[i][0] = h;
			hw[i][1] = w;

			count++;
		}



		//これで高さと横をint型で出せるようになった
		for (int i = 0; i < count-1 ; i++) {


			StringBuilder x = new StringBuilder();

			for (int j = 0; j < hw[i][1]; j++) {

				if (j == 0 || j%2 == 0 ) {
					x.append("#");
				} else {
					x.append(".");
				}

			}

			String z = x.toString();


			StringBuilder a = new StringBuilder();

			for (int j = 0; j < hw[i][1]; j++) {

				if (j == 0 || j%2 == 0 ) {
					a.append(".");
				} else {
					a.append("#");
				}

			}

			String b = a.toString();

			for (int j = 0; j < hw[i][0]; j++) {
				if (j == 0 || j%2 == 0) {
					System.out.println(z);
				} else {
					System.out.println(b);
				}
			}



			System.out.println("");
		}


	}

} public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int[][]hw = new int[10000][2];

		int h = 1;
		int w = 1;

		//何セット分入力したか
		int count = 0;

		for (int i = 0; h != 0 || w != 0; i++) {

			String line = sc.nextLine();
			String[]HW = line.split(" ");
			h = Integer.parseInt(HW[0]);
			w = Integer.parseInt(HW[1]);

			hw[i][0] = h;
			hw[i][1] = w;

			count++;
		}



		//これで高さと横をint型で出せるようになった
		for (int i = 0; i < count-1 ; i++) {


			StringBuilder x = new StringBuilder();

			for (int j = 0; j < hw[i][1]; j++) {

				if (j == 0 || j%2 == 0 ) {
					x.append("#");
				} else {
					x.append(".");
				}

			}

			String z = x.toString();


			StringBuilder a = new StringBuilder();

			for (int j = 0; j < hw[i][1]; j++) {

				if (j == 0 || j%2 == 0 ) {
					a.append(".");
				} else {
					a.append("#");
				}

			}

			String b = a.toString();

			for (int j = 0; j < hw[i][0]; j++) {
				if (j == 0 || j%2 == 0) {
					System.out.println(z);
				} else {
					System.out.println(b);
				}
			}



			System.out.println("");
		}


	}

} Main
import java.util.Scanner;


public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int[][]hw = new int[10000][2];

		int h = 1;
		int w = 1;

		//何セット分入力したか
		int count = 0;

		for (int i = 0; h != 0 || w != 0; i++) {

			String line = sc.nextLine();
			String[]HW = line.split(" ");
			h = Integer.parseInt(HW[0]);
			w = Integer.parseInt(HW[1]);

			hw[i][0] = h;
			hw[i][1] = w;

			count++;
		}



		//これで高さと横をint型で出せるようになった
		for (int i = 0; i < count-1 ; i++) {


			StringBuilder x = new StringBuilder();

			for (int j = 0; j < hw[i][1]; j++) {

				if (j == 0 || j%2 == 0 ) {
					x.append("#");
				} else {
					x.append(".");
				}

			}

			String z = x.toString();


			StringBuilder a = new StringBuilder();

			for (int j = 0; j < hw[i][1]; j++) {

				if (j == 0 || j%2 == 0 ) {
					a.append(".");
				} else {
					a.append("#");
				}

			}

			String b = a.toString();

			for (int j = 0; j < hw[i][0]; j++) {
				if (j == 0 || j%2 == 0) {
					System.out.println(z);
				} else {
					System.out.println(b);
				}
			}



			System.out.println("");
		}


	}

}

