readlines.each do |line|

    break if line[0..2] == "0 0"

    line = line.split.map(&:to_i)

    for height in 1..line[0]

      height.even? ? even = 1..line[1] : even = 0...line[1]

      for width in even
        width.even? ? print("#") : print(".")
      end

      puts ""

    end
    
    puts ""

  end
