
import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		Scanner a = new Scanner(System.in);
		int h = 1;
		int w = 1;
		while(h > 0 && w > 0){
		h = a.nextInt();
		w = a.nextInt();
		for(int i = 0;i < h;i++){
			for(int j = 0;j < w;j++){
				System.out.print("#");
			}
			if(h != 0 && w != 0)
			System.out.println();
		}
		if(h != 0 && w != 0)
			System.out.println();
		}
	}

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

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

} public class Main{
	public static void main(String[] args){
		Scanner a = new Scanner(System.in);
		int h = 1;
		int w = 1;
		while(h > 0 && w > 0){
		h = a.nextInt();
		w = a.nextInt();
		for(int i = 0;i < h;i++){
			for(int j = 0;j < w;j++){
				System.out.print("#");
			}
			if(h != 0 && w != 0)
			System.out.println();
		}
		if(h != 0 && w != 0)
			System.out.println();
		}
	}

} Main

import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		Scanner a = new Scanner(System.in);
		int h = 1;
		int w = 1;
		while(h > 0 && w > 0){
		h = a.nextInt();
		w = a.nextInt();
		for(int i = 0;i < h;i++){
			for(int j = 0;j < w;j++){
				System.out.print("#");
			}
			if(h != 0 && w != 0)
			System.out.println();
		}
		if(h != 0 && w != 0)
			System.out.println();
		}
	}

}