loop do
  h, w = gets.split.map(&:to_i)
  break if h.zero? && w.zero?

  even_line = (0...w).map { |i| i.even? ? '#' : '.' }.join
  odd_line  = (0...w).map { |i| i.even? ? '.' : '#' }.join

  h.times do |i|
    line = i.even? ? even_line : odd_line
    puts line
  end
  puts
end