readlines.each do |line|
  h, w = line.split.map(&:to_i)
  break if h == 0 && w == 0

  (1..h).each do |i|
    if i.odd?
      puts (1..w).map { |j| j.odd? ? '#' : '.' }.join
    else
      puts (1..w).map { |j| j.odd? ? '.' : '#' }.join
    end
  end

  puts
end