import java.util.Scanner;
public class Main {
	private static Scanner sc;

	public static void main(String[] args) {
	   sc = new Scanner(System.in);
	 
	   while(true){
	   int h=sc.nextInt();
	   int w=sc.nextInt();
	   if(h==0&&w==0)break;
	   else for(int i = 0;i<h;i++){
		   int m=0;   
		   while(m<w){
			   System.out.print("#");
			   m=m+1;
		   }
		   
	         System.out.println();
   }
	   System.out.println();
  }  
 }
} import java.util.Scanner; Scanner java.util public class Main {
	private static Scanner sc;

	public static void main(String[] args) {
	   sc = new Scanner(System.in);
	 
	   while(true){
	   int h=sc.nextInt();
	   int w=sc.nextInt();
	   if(h==0&&w==0)break;
	   else for(int i = 0;i<h;i++){
		   int m=0;   
		   while(m<w){
			   System.out.print("#");
			   m=m+1;
		   }
		   
	         System.out.println();
   }
	   System.out.println();
  }  
 }
} Main private static Scanner sc; sc public static void main(String[] args) {
	   sc = new Scanner(System.in);
	 
	   while(true){
	   int h=sc.nextInt();
	   int w=sc.nextInt();
	   if(h==0&&w==0)break;
	   else for(int i = 0;i<h;i++){
		   int m=0;   
		   while(m<w){
			   System.out.print("#");
			   m=m+1;
		   }
		   
	         System.out.println();
   }
	   System.out.println();
  }  
 } main {
	   sc = new Scanner(System.in);
	 
	   while(true){
	   int h=sc.nextInt();
	   int w=sc.nextInt();
	   if(h==0&&w==0)break;
	   else for(int i = 0;i<h;i++){
		   int m=0;   
		   while(m<w){
			   System.out.print("#");
			   m=m+1;
		   }
		   
	         System.out.println();
   }
	   System.out.println();
  }  
 } sc = new Scanner(System.in) sc new Scanner(System.in) while(true){
	   int h=sc.nextInt();
	   int w=sc.nextInt();
	   if(h==0&&w==0)break;
	   else for(int i = 0;i<h;i++){
		   int m=0;   
		   while(m<w){
			   System.out.print("#");
			   m=m+1;
		   }
		   
	         System.out.println();
   }
	   System.out.println();
  } true {
	   int h=sc.nextInt();
	   int w=sc.nextInt();
	   if(h==0&&w==0)break;
	   else for(int i = 0;i<h;i++){
		   int m=0;   
		   while(m<w){
			   System.out.print("#");
			   m=m+1;
		   }
		   
	         System.out.println();
   }
	   System.out.println();
  } int h=sc.nextInt(); h sc.nextInt() sc.nextInt sc int w=sc.nextInt(); w sc.nextInt() sc.nextInt sc if(h==0&&w==0)break;
	   else for(int i = 0;i<h;i++){
		   int m=0;   
		   while(m<w){
			   System.out.print("#");
			   m=m+1;
		   }
		   
	         System.out.println();
   } h==0&&w==0 h==0 h 0 w==0 w 0 break; for(int i = 0;i<h;i++){
		   int m=0;   
		   while(m<w){
			   System.out.print("#");
			   m=m+1;
		   }
		   
	         System.out.println();
   } int i = 0; int i = 0; i 0 i<h i h i++ i++ i {
		   int m=0;   
		   while(m<w){
			   System.out.print("#");
			   m=m+1;
		   }
		   
	         System.out.println();
   } {
		   int m=0;   
		   while(m<w){
			   System.out.print("#");
			   m=m+1;
		   }
		   
	         System.out.println();
   } int m=0; m 0 while(m<w){
			   System.out.print("#");
			   m=m+1;
		   } m<w m w {
			   System.out.print("#");
			   m=m+1;
		   } System.out.print("#") System.out.print System.out System System.out "#" m=m+1 m m+1 m 1 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 {
	private static Scanner sc;

	public static void main(String[] args) {
	   sc = new Scanner(System.in);
	 
	   while(true){
	   int h=sc.nextInt();
	   int w=sc.nextInt();
	   if(h==0&&w==0)break;
	   else for(int i = 0;i<h;i++){
		   int m=0;   
		   while(m<w){
			   System.out.print("#");
			   m=m+1;
		   }
		   
	         System.out.println();
   }
	   System.out.println();
  }  
 }
} public class Main {
	private static Scanner sc;

	public static void main(String[] args) {
	   sc = new Scanner(System.in);
	 
	   while(true){
	   int h=sc.nextInt();
	   int w=sc.nextInt();
	   if(h==0&&w==0)break;
	   else for(int i = 0;i<h;i++){
		   int m=0;   
		   while(m<w){
			   System.out.print("#");
			   m=m+1;
		   }
		   
	         System.out.println();
   }
	   System.out.println();
  }  
 }
} Main
import java.util.Scanner;
public class Main {
	private static Scanner sc;

	public static void main(String[] args) {
	   sc = new Scanner(System.in);
	 
	   while(true){
	   int h=sc.nextInt();
	   int w=sc.nextInt();
	   if(h==0&&w==0)break;
	   else for(int i = 0;i<h;i++){
		   int m=0;   
		   while(m<w){
			   System.out.print("#");
			   m=m+1;
		   }
		   
	         System.out.println();
   }
	   System.out.println();
  }  
 }
}