
def print_row(s, e, w)
  (1..w).map { |i|
    i.odd? ? s : e
  }.join
end

def print_chessboard(h, w)
  (1..h).each do |i|
    puts "#{i.odd? ? print_row('#', '.', w) : print_row('.', '#', w)}"
  end
  puts ""
end

loop do
  h, w = gets.split.map(&:to_i)
  break if h == 0 && w == 0

  print_chessboard(h, w)
end

