while (h, w = gets.chomp.split.map(&:to_i)) != [0, 0] do
  count = 1; board = ""
  h.times do
    board += (count % 2 == 1) ? "#." * (w / 2) : ".#" * (w / 2)
    board += (w % 2 == 0) ? "" : ((count % 2 == 1) ? "#" : ".")
    board += "\n"
    count += 1
  end
  puts board + "\n"
end
