loop do
  h, w = gets.split.map!(&:to_i)
  break if h == 0 && w == 0
  h.times do |i|
    pattern = ""
    w.times do |j|
      addCell(  i % 2 == 0 ? j : j + 1, pattern)
    end
    puts pattern
  end
  puts ""
end

def addCell(j, str) 
  (j % 2 == 0) ? str + "." : str + "#"
end 