ARGF.each_line do |line|
  h, w = line.split.map(&:to_i)
  break if [h, w].eql? [0, 0]
  1.upto(h) { |i|
    if i.odd?
      w.times{|n| print n.odd? ? "#" : "."}
      puts
    else
      w.times{|n| print n.odd? ? "." : "#"}
      puts
    end
  }
  puts
end