fun main(args: Array<String>) {
    while (true){
        val(w, h) = readLine()?.split(" ")?.map { it.toInt() } ?: return
        if(w == 0 && h == 0) return
        for(i in 1..h) {
            val row = StringBuilder()
            for(j in 1..w) {
                val element = if (i % 2 == 1 && j % 2 == 1 || i % 2 == 0 && j % 2 == 2) "#" else "."
                row.append(element)
            }
            println(row.toString())
        }
        println("")
    }
}
