/* ITP1_5_A */
import java.io.*;

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

    while(true){
      //input
      String str[] = br.readLine().split(" ");
      int height = Integer.parseInt(str[0]);
      int width = Integer.parseInt(str[1]);
      //finish
      if(height == 0 && width == 0) break;
      //draw
      for(int i = 0; i < height; i++){
        for(int j = 0; j < width; j++){
          System.out.print("#");
        }
        System.out.println("");
      }
      System.out.println("");
    }

  }
} import java.io.*; io.* java class Main
{
  public static void main(String[] args) throws IOException
  {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

    while(true){
      //input
      String str[] = br.readLine().split(" ");
      int height = Integer.parseInt(str[0]);
      int width = Integer.parseInt(str[1]);
      //finish
      if(height == 0 && width == 0) break;
      //draw
      for(int i = 0; i < height; i++){
        for(int j = 0; j < width; j++){
          System.out.print("#");
        }
        System.out.println("");
      }
      System.out.println("");
    }

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

    while(true){
      //input
      String str[] = br.readLine().split(" ");
      int height = Integer.parseInt(str[0]);
      int width = Integer.parseInt(str[1]);
      //finish
      if(height == 0 && width == 0) break;
      //draw
      for(int i = 0; i < height; i++){
        for(int j = 0; j < width; j++){
          System.out.print("#");
        }
        System.out.println("");
      }
      System.out.println("");
    }

  } main {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

    while(true){
      //input
      String str[] = br.readLine().split(" ");
      int height = Integer.parseInt(str[0]);
      int width = Integer.parseInt(str[1]);
      //finish
      if(height == 0 && width == 0) break;
      //draw
      for(int i = 0; i < height; i++){
        for(int j = 0; j < width; j++){
          System.out.print("#");
        }
        System.out.println("");
      }
      System.out.println("");
    }

  } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) while(true){
      //input
      String str[] = br.readLine().split(" ");
      int height = Integer.parseInt(str[0]);
      int width = Integer.parseInt(str[1]);
      //finish
      if(height == 0 && width == 0) break;
      //draw
      for(int i = 0; i < height; i++){
        for(int j = 0; j < width; j++){
          System.out.print("#");
        }
        System.out.println("");
      }
      System.out.println("");
    } true {
      //input
      String str[] = br.readLine().split(" ");
      int height = Integer.parseInt(str[0]);
      int width = Integer.parseInt(str[1]);
      //finish
      if(height == 0 && width == 0) break;
      //draw
      for(int i = 0; i < height; i++){
        for(int j = 0; j < width; j++){
          System.out.print("#");
        }
        System.out.println("");
      }
      System.out.println("");
    } String str[] = br.readLine().split(" "); str br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int height = Integer.parseInt(str[0]); height Integer.parseInt(str[0]) Integer.parseInt Integer str[0] str 0 int width = Integer.parseInt(str[1]); width Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 if(height == 0 && width == 0) break; height == 0 && width == 0 height == 0 height 0 width == 0 width 0 break; for(int i = 0; i < height; i++){
        for(int j = 0; j < width; j++){
          System.out.print("#");
        }
        System.out.println("");
      } int i = 0; int i = 0; i 0 i < height i height i++ i++ i {
        for(int j = 0; j < width; j++){
          System.out.print("#");
        }
        System.out.println("");
      } {
        for(int j = 0; j < width; j++){
          System.out.print("#");
        }
        System.out.println("");
      } for(int j = 0; j < width; j++){
          System.out.print("#");
        } int j = 0; int j = 0; j 0 j < width j width j++ j++ j {
          System.out.print("#");
        } {
          System.out.print("#");
        } System.out.print("#") System.out.print System.out System System.out "#" System.out.println("") System.out.println System.out System System.out "" System.out.println("") System.out.println System.out System System.out "" String[] args args
/* ITP1_5_A */
import java.io.*;

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

    while(true){
      //input
      String str[] = br.readLine().split(" ");
      int height = Integer.parseInt(str[0]);
      int width = Integer.parseInt(str[1]);
      //finish
      if(height == 0 && width == 0) break;
      //draw
      for(int i = 0; i < height; i++){
        for(int j = 0; j < width; j++){
          System.out.print("#");
        }
        System.out.println("");
      }
      System.out.println("");
    }

  }
}