loop do
  height, width = gets.chomp.split.map(&:to_i)
  break if height == 0 && width == 0
  height.times do |h|
    width.times do |w|
      print (h + w) % 2 == 0 ? '#' : '.'
    end
    puts
  end
  puts
end

