let draw h w =
	let rec draw1 w =
		if w = 0 then print_string "\n" else (print_string "#";draw2 (w-1))
	and draw2 w =
		if w = 0 then print_string "\n" else (print_string ".";draw1 (w-1))
	in
	let rec draw_l1 h w =
		if h = 0 then print_string "\n" else (draw1 w;draw_l2 (h-1) w)
	and draw_l2 h w =
		if h = 0 then print_string "\n" else (draw2 w; draw_l1 (h-1) w)
	in
	draw_l1 h w;;

let rec loop() =
	Scanf.sscanf(read_line()) "%d %d" (fun x y -> if x = 0 && y = 0 then () else (draw x y;loop()));;

loop();;

