#include <bits/stdc++.h>
int main(void) {
  int H;
  int W;
  int a;
  int b;
  for (;;) {
    scanf("%d %d", &H, &W);
    if (H == 0 && W == 0) {
      break;
    }
    for (a = 1; a <= H; a++) {
      for (b = 1; b <= W; b++) {
        printf("#");
      }
      printf("\n");
    }
    printf("\n");
  }
  return (0);
}
