import java.util.Scanner;

public class Main{
	public static void main(String[] args){
        
        Scanner sc = new Scanner(System.in);
        long a,b,i,j;
		while(true){
        a = sc.nextInt();
        b = sc.nextInt();
            if(a==0&&b==0)break;
            
		for(i=0;i<a;i++){
            for(j=0;j<b;j++){
            System.out.print("#");
        } 
         System.out.println();
      }
            System.out.println();
    }
  }
} import java.util.Scanner; Scanner java.util public class Main{
	public static void main(String[] args){
        
        Scanner sc = new Scanner(System.in);
        long a,b,i,j;
		while(true){
        a = sc.nextInt();
        b = sc.nextInt();
            if(a==0&&b==0)break;
            
		for(i=0;i<a;i++){
            for(j=0;j<b;j++){
            System.out.print("#");
        } 
         System.out.println();
      }
            System.out.println();
    }
  }
} Main public static void main(String[] args){
        
        Scanner sc = new Scanner(System.in);
        long a,b,i,j;
		while(true){
        a = sc.nextInt();
        b = sc.nextInt();
            if(a==0&&b==0)break;
            
		for(i=0;i<a;i++){
            for(j=0;j<b;j++){
            System.out.print("#");
        } 
         System.out.println();
      }
            System.out.println();
    }
  } main {
        
        Scanner sc = new Scanner(System.in);
        long a,b,i,j;
		while(true){
        a = sc.nextInt();
        b = sc.nextInt();
            if(a==0&&b==0)break;
            
		for(i=0;i<a;i++){
            for(j=0;j<b;j++){
            System.out.print("#");
        } 
         System.out.println();
      }
            System.out.println();
    }
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long a a b b i i j; j while(true){
        a = sc.nextInt();
        b = sc.nextInt();
            if(a==0&&b==0)break;
            
		for(i=0;i<a;i++){
            for(j=0;j<b;j++){
            System.out.print("#");
        } 
         System.out.println();
      }
            System.out.println();
    } true {
        a = sc.nextInt();
        b = sc.nextInt();
            if(a==0&&b==0)break;
            
		for(i=0;i<a;i++){
            for(j=0;j<b;j++){
            System.out.print("#");
        } 
         System.out.println();
      }
            System.out.println();
    } a = sc.nextInt() a sc.nextInt() sc.nextInt sc b = sc.nextInt() b sc.nextInt() sc.nextInt sc if(a==0&&b==0)break; a==0&&b==0 a==0 a 0 b==0 b 0 break; for(i=0;i<a;i++){
            for(j=0;j<b;j++){
            System.out.print("#");
        } 
         System.out.println();
      } i=0; i=0 i 0 i<a i a i++ i++ i {
            for(j=0;j<b;j++){
            System.out.print("#");
        } 
         System.out.println();
      } {
            for(j=0;j<b;j++){
            System.out.print("#");
        } 
         System.out.println();
      } for(j=0;j<b;j++){
            System.out.print("#");
        } j=0; j=0 j 0 j<b j b 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);
        long a,b,i,j;
		while(true){
        a = sc.nextInt();
        b = sc.nextInt();
            if(a==0&&b==0)break;
            
		for(i=0;i<a;i++){
            for(j=0;j<b;j++){
            System.out.print("#");
        } 
         System.out.println();
      }
            System.out.println();
    }
  }
} public class Main{
	public static void main(String[] args){
        
        Scanner sc = new Scanner(System.in);
        long a,b,i,j;
		while(true){
        a = sc.nextInt();
        b = sc.nextInt();
            if(a==0&&b==0)break;
            
		for(i=0;i<a;i++){
            for(j=0;j<b;j++){
            System.out.print("#");
        } 
         System.out.println();
      }
            System.out.println();
    }
  }
} Main
import java.util.Scanner;

public class Main{
	public static void main(String[] args){
        
        Scanner sc = new Scanner(System.in);
        long a,b,i,j;
		while(true){
        a = sc.nextInt();
        b = sc.nextInt();
            if(a==0&&b==0)break;
            
		for(i=0;i<a;i++){
            for(j=0;j<b;j++){
            System.out.print("#");
        } 
         System.out.println();
      }
            System.out.println();
    }
  }
}
