import java.util.*;

class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int W,H;
for(;;){
H =sc.nextInt();
W =sc.nextInt();
if(H == 0) break;
for(int i=H;i>0;i--){
for(int n=W;n>0;n--){	
System.out.print("#");
}
System.out.println();
}
System.out.println();
}
}
	} import java.util.*; util.* java class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int W,H;
for(;;){
H =sc.nextInt();
W =sc.nextInt();
if(H == 0) break;
for(int i=H;i>0;i--){
for(int n=W;n>0;n--){	
System.out.print("#");
}
System.out.println();
}
System.out.println();
}
}
	} Main public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int W,H;
for(;;){
H =sc.nextInt();
W =sc.nextInt();
if(H == 0) break;
for(int i=H;i>0;i--){
for(int n=W;n>0;n--){	
System.out.print("#");
}
System.out.println();
}
System.out.println();
}
} main {
Scanner sc = new Scanner(System.in);
int W,H;
for(;;){
H =sc.nextInt();
W =sc.nextInt();
if(H == 0) break;
for(int i=H;i>0;i--){
for(int n=W;n>0;n--){	
System.out.print("#");
}
System.out.println();
}
System.out.println();
}
} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int W W H; H for(;;){
H =sc.nextInt();
W =sc.nextInt();
if(H == 0) break;
for(int i=H;i>0;i--){
for(int n=W;n>0;n--){	
System.out.print("#");
}
System.out.println();
}
System.out.println();
} ; {
H =sc.nextInt();
W =sc.nextInt();
if(H == 0) break;
for(int i=H;i>0;i--){
for(int n=W;n>0;n--){	
System.out.print("#");
}
System.out.println();
}
System.out.println();
} {
H =sc.nextInt();
W =sc.nextInt();
if(H == 0) break;
for(int i=H;i>0;i--){
for(int n=W;n>0;n--){	
System.out.print("#");
}
System.out.println();
}
System.out.println();
} H =sc.nextInt() H sc.nextInt() sc.nextInt sc W =sc.nextInt() W sc.nextInt() sc.nextInt sc if(H == 0) break; H == 0 H 0 break; for(int i=H;i>0;i--){
for(int n=W;n>0;n--){	
System.out.print("#");
}
System.out.println();
} int i=H; int i=H; i H i>0 i 0 i-- i-- i {
for(int n=W;n>0;n--){	
System.out.print("#");
}
System.out.println();
} {
for(int n=W;n>0;n--){	
System.out.print("#");
}
System.out.println();
} for(int n=W;n>0;n--){	
System.out.print("#");
} int n=W; int n=W; n W n>0 n 0 n-- n-- n {	
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
import java.util.*;

class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int W,H;
for(;;){
H =sc.nextInt();
W =sc.nextInt();
if(H == 0) break;
for(int i=H;i>0;i--){
for(int n=W;n>0;n--){	
System.out.print("#");
}
System.out.println();
}
System.out.println();
}
}
	}