import java.util.*;
/*
Main class for AOJ where there is no input.
*/
public class Main{
   public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      String str;
      String[] arr;
      int h;
      int w;
      int i,j;
         
      while(true){
         str = sc.nextLine();
         arr = str.split(" ");
         h = Integer.parseInt(arr[0]);
         w = Integer.parseInt(arr[1]);
         
         if(h == 0 && w == 0){
            break;
         }
         
         
         for(i = 0; i < h; i ++ ){
            for(j = 0; j < w; j ++){
               System.out.print("#");
            }
            System.out.println();
         }
         System.out.println();
      
      }    
   }//main method 
}//class import java.util.*; util.* java public class Main{
   public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      String str;
      String[] arr;
      int h;
      int w;
      int i,j;
         
      while(true){
         str = sc.nextLine();
         arr = str.split(" ");
         h = Integer.parseInt(arr[0]);
         w = Integer.parseInt(arr[1]);
         
         if(h == 0 && w == 0){
            break;
         }
         
         
         for(i = 0; i < h; i ++ ){
            for(j = 0; j < w; j ++){
               System.out.print("#");
            }
            System.out.println();
         }
         System.out.println();
      
      }    
   }//main method 
}//class Main public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      String str;
      String[] arr;
      int h;
      int w;
      int i,j;
         
      while(true){
         str = sc.nextLine();
         arr = str.split(" ");
         h = Integer.parseInt(arr[0]);
         w = Integer.parseInt(arr[1]);
         
         if(h == 0 && w == 0){
            break;
         }
         
         
         for(i = 0; i < h; i ++ ){
            for(j = 0; j < w; j ++){
               System.out.print("#");
            }
            System.out.println();
         }
         System.out.println();
      
      }    
   }//main method  main {
      Scanner sc = new Scanner(System.in);
      String str;
      String[] arr;
      int h;
      int w;
      int i,j;
         
      while(true){
         str = sc.nextLine();
         arr = str.split(" ");
         h = Integer.parseInt(arr[0]);
         w = Integer.parseInt(arr[1]);
         
         if(h == 0 && w == 0){
            break;
         }
         
         
         for(i = 0; i < h; i ++ ){
            for(j = 0; j < w; j ++){
               System.out.print("#");
            }
            System.out.println();
         }
         System.out.println();
      
      }    
   } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str; str String[] arr; arr int h; h int w; w int i i j; j while(true){
         str = sc.nextLine();
         arr = str.split(" ");
         h = Integer.parseInt(arr[0]);
         w = Integer.parseInt(arr[1]);
         
         if(h == 0 && w == 0){
            break;
         }
         
         
         for(i = 0; i < h; i ++ ){
            for(j = 0; j < w; j ++){
               System.out.print("#");
            }
            System.out.println();
         }
         System.out.println();
      
      } true {
         str = sc.nextLine();
         arr = str.split(" ");
         h = Integer.parseInt(arr[0]);
         w = Integer.parseInt(arr[1]);
         
         if(h == 0 && w == 0){
            break;
         }
         
         
         for(i = 0; i < h; i ++ ){
            for(j = 0; j < w; j ++){
               System.out.print("#");
            }
            System.out.println();
         }
         System.out.println();
      
      } str = sc.nextLine() str sc.nextLine() sc.nextLine sc arr = str.split(" ") arr str.split(" ") str.split str " " h = Integer.parseInt(arr[0]) h Integer.parseInt(arr[0]) Integer.parseInt Integer arr[0] arr 0 w = Integer.parseInt(arr[1]) w Integer.parseInt(arr[1]) Integer.parseInt Integer arr[1] arr 1 if(h == 0 && w == 0){
            break;
         } h == 0 && w == 0 h == 0 h 0 w == 0 w 0 {
            break;
         } break; for(i = 0; i < h; i ++ ){
            for(j = 0; j < w; j ++){
               System.out.print("#");
            }
            System.out.println();
         } i = 0; i = 0 i 0 i < h i h i ++ i ++ i {
            for(j = 0; j < w; j ++){
               System.out.print("#");
            }
            System.out.println();
         } {
            for(j = 0; j < w; j ++){
               System.out.print("#");
            }
            System.out.println();
         } for(j = 0; j < w; j ++){
               System.out.print("#");
            } j = 0; j = 0 j 0 j < w j w 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 public class Main{
   public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      String str;
      String[] arr;
      int h;
      int w;
      int i,j;
         
      while(true){
         str = sc.nextLine();
         arr = str.split(" ");
         h = Integer.parseInt(arr[0]);
         w = Integer.parseInt(arr[1]);
         
         if(h == 0 && w == 0){
            break;
         }
         
         
         for(i = 0; i < h; i ++ ){
            for(j = 0; j < w; j ++){
               System.out.print("#");
            }
            System.out.println();
         }
         System.out.println();
      
      }    
   }//main method 
}//class public class Main{
   public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      String str;
      String[] arr;
      int h;
      int w;
      int i,j;
         
      while(true){
         str = sc.nextLine();
         arr = str.split(" ");
         h = Integer.parseInt(arr[0]);
         w = Integer.parseInt(arr[1]);
         
         if(h == 0 && w == 0){
            break;
         }
         
         
         for(i = 0; i < h; i ++ ){
            for(j = 0; j < w; j ++){
               System.out.print("#");
            }
            System.out.println();
         }
         System.out.println();
      
      }    
   }//main method 
}//class Main
import java.util.*;
/*
Main class for AOJ where there is no input.
*/
public class Main{
   public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      String str;
      String[] arr;
      int h;
      int w;
      int i,j;
         
      while(true){
         str = sc.nextLine();
         arr = str.split(" ");
         h = Integer.parseInt(arr[0]);
         w = Integer.parseInt(arr[1]);
         
         if(h == 0 && w == 0){
            break;
         }
         
         
         for(i = 0; i < h; i ++ ){
            for(j = 0; j < w; j ++){
               System.out.print("#");
            }
            System.out.println();
         }
         System.out.println();
      
      }    
   }//main method 
}//class