loop {
  h, w = gets.chomp.split(' ').map { |i| i.to_i }
  if h == 0 and w == 0 then break
  else
    (1..h).each {
      (1..w).each {
        print '#'
      }
      print "\n"
    }
    print "\n"
  end
}