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