import java.io.*;

class Main{
  public static void main(String[] args) throws IOException{
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    StringBuilder sb = new StringBuilder();

    while(true){
    String str1 = br.readLine();
    String[] str2 = str1.split(" ");
    int H = Integer.parseInt(str2[0]);
    int W = Integer.parseInt(str2[1]);

    if(H == 0 && W == 0) {break;}

    for (int i = 0; i < H; i++){
      for(int j = 0; j < W; j++){
        sb.append("#");
      }
      sb.append("\n");
    }
    sb.append("\n");
    }
    System.out.print(sb);
  }
} import java.io.*; io.* java class Main{
  public static void main(String[] args) throws IOException{
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    StringBuilder sb = new StringBuilder();

    while(true){
    String str1 = br.readLine();
    String[] str2 = str1.split(" ");
    int H = Integer.parseInt(str2[0]);
    int W = Integer.parseInt(str2[1]);

    if(H == 0 && W == 0) {break;}

    for (int i = 0; i < H; i++){
      for(int j = 0; j < W; j++){
        sb.append("#");
      }
      sb.append("\n");
    }
    sb.append("\n");
    }
    System.out.print(sb);
  }
} Main public static void main(String[] args) throws IOException{
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    StringBuilder sb = new StringBuilder();

    while(true){
    String str1 = br.readLine();
    String[] str2 = str1.split(" ");
    int H = Integer.parseInt(str2[0]);
    int W = Integer.parseInt(str2[1]);

    if(H == 0 && W == 0) {break;}

    for (int i = 0; i < H; i++){
      for(int j = 0; j < W; j++){
        sb.append("#");
      }
      sb.append("\n");
    }
    sb.append("\n");
    }
    System.out.print(sb);
  } main {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    StringBuilder sb = new StringBuilder();

    while(true){
    String str1 = br.readLine();
    String[] str2 = str1.split(" ");
    int H = Integer.parseInt(str2[0]);
    int W = Integer.parseInt(str2[1]);

    if(H == 0 && W == 0) {break;}

    for (int i = 0; i < H; i++){
      for(int j = 0; j < W; j++){
        sb.append("#");
      }
      sb.append("\n");
    }
    sb.append("\n");
    }
    System.out.print(sb);
  } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) StringBuilder sb = new StringBuilder(); sb new StringBuilder() while(true){
    String str1 = br.readLine();
    String[] str2 = str1.split(" ");
    int H = Integer.parseInt(str2[0]);
    int W = Integer.parseInt(str2[1]);

    if(H == 0 && W == 0) {break;}

    for (int i = 0; i < H; i++){
      for(int j = 0; j < W; j++){
        sb.append("#");
      }
      sb.append("\n");
    }
    sb.append("\n");
    } true {
    String str1 = br.readLine();
    String[] str2 = str1.split(" ");
    int H = Integer.parseInt(str2[0]);
    int W = Integer.parseInt(str2[1]);

    if(H == 0 && W == 0) {break;}

    for (int i = 0; i < H; i++){
      for(int j = 0; j < W; j++){
        sb.append("#");
      }
      sb.append("\n");
    }
    sb.append("\n");
    } String str1 = br.readLine(); str1 br.readLine() br.readLine br String[] str2 = str1.split(" "); str2 str1.split(" ") str1.split str1 " " int H = Integer.parseInt(str2[0]); H Integer.parseInt(str2[0]) Integer.parseInt Integer str2[0] str2 0 int W = Integer.parseInt(str2[1]); W Integer.parseInt(str2[1]) Integer.parseInt Integer str2[1] str2 1 if(H == 0 && W == 0) {break;} H == 0 && W == 0 H == 0 H 0 W == 0 W 0 {break;} break; for (int i = 0; i < H; i++){
      for(int j = 0; j < W; j++){
        sb.append("#");
      }
      sb.append("\n");
    } int i = 0; int i = 0; i 0 i < H i H i++ i++ i {
      for(int j = 0; j < W; j++){
        sb.append("#");
      }
      sb.append("\n");
    } {
      for(int j = 0; j < W; j++){
        sb.append("#");
      }
      sb.append("\n");
    } for(int j = 0; j < W; j++){
        sb.append("#");
      } int j = 0; int j = 0; j 0 j < W j W j++ j++ j {
        sb.append("#");
      } {
        sb.append("#");
      } sb.append("#") sb.append sb "#" sb.append("\n") sb.append sb "\n" sb.append("\n") sb.append sb "\n" System.out.print(sb) System.out.print System.out System System.out sb String[] args args
import java.io.*;

class Main{
  public static void main(String[] args) throws IOException{
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    StringBuilder sb = new StringBuilder();

    while(true){
    String str1 = br.readLine();
    String[] str2 = str1.split(" ");
    int H = Integer.parseInt(str2[0]);
    int W = Integer.parseInt(str2[1]);

    if(H == 0 && W == 0) {break;}

    for (int i = 0; i < H; i++){
      for(int j = 0; j < W; j++){
        sb.append("#");
      }
      sb.append("\n");
    }
    sb.append("\n");
    }
    System.out.print(sb);
  }
}