fun main(args: Array<String>) {
    while (true) {
        val inStr = readLine()
        val (h, w) = inStr?.split(' ')?.map { s -> s.toInt() } ?: return

        if ((h == 0) && (w == 0)) {
            return
        }
        printChessboard(h, w)
        println()
    }
}

fun printChessboard(height:Int, width:Int) {
    for (y in 1..height) {
        var oddSimbol : Char = if ((y % 2) != 0) '#' else '.'
        var evenSimbol : Char =if ((y % 2) != 0) '.' else '#'

        for (x in 1..width) {
            if ((x % 2) != 0) {
                print(oddSimbol)
            } else {
                print(evenSimbol)
            }
        }
        println()
    }
}

