while true
  h, w = gets.chomp.split(/\s/).map(&:to_i)
  break if h == 0 && w == 0
  pattern = %w(# .)
  h.times do |i|
    puts (pattern * (w / 2 + 1))[0...w].join("")
    pattern.reverse!
  end
  puts ""
end