<?php

while (true) {
    
    fscanf(STDIN, "%d %d", $height, $width);
    
    if ($height == 0 && $width == 0){
        break;
    }
    
    $rectangle = new Rectangle($height, $width);
    $rectangles[] = $rectangle->drawChess();
}

echo implode(PHP_EOL, $rectangles),PHP_EOL;

class Rectangle {
    
    private $height;
    private $width;
    
    public function __construct($height, $width){
        $this->height = $height;
        $this->width = $width;
    }
    
    public function draw(){
        $rectangle = [];
        for($i = 0; $i < $this->height; $i++){
            $rectangle[] = str_repeat("#", $this->width);
        }
        return implode(PHP_EOL, $rectangle).PHP_EOL;
    }
    
    public function drawCheck(){
        $rectangle = [];
        for($i = 0; $i < $this->height; $i++){
            if($i == 0 || $i == $this->height -1 || $this->width <= 2){
                $rectangle[] = str_repeat("#", $this->width);
            }else{
                $rectangle[] = "#".str_repeat(".", $this->width - 2)."#";
            }
        }
        return implode(PHP_EOL, $rectangle).PHP_EOL;
    }
    
    public function drawChess(){
        $rectangle = [];
        for($i = 0; $i < $this->height - 1; $i++){
            if($i % 2 == 0){
                $rectangle[] = $this->drawLine('#', '.');
            }else{
                $rectangle[] = $this->drawLine(".", "#");
            }
        }
        return implode(PHP_EOL, $rectangle).PHP_EOL;
    }
    
    public function drawLine($mark1, $mark2){
        $line = "";
        for($i = 0; $i < $this->width; $i++){
            if($i % 2 == 0){
                $line .= $mark1;
            }else{
                $line .= $mark2;
            }
        }
        return $line;
    }
    
}