import std.stdio;
import std.conv;
import std.string;
import std.typecons;
import std.algorithm;
import std.array;
import std.range;
import std.math;
import std.container;
import std.datetime;
 
 
void main()
{
  while (1) {
    auto x = readln.chomp.split.map!(to!int);
    if (x[0] == 0 && x[1] == 0) break;
    foreach (i; 0..x[0]) { 
      foreach (j; 0..x[1]) write("#");
      writeln("");
    }
    writeln("");
  }
}