while (h, w = gets.split.map(&:to_i)) != [0,0]
  h.times do |i|
    w.times do |j|
      if (i+j) % 2 == 0
        printf("%s", '#')
      else
        printf("%s", '.')
      end
    end
    puts ""
  end
  puts ""
end
