import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String h = scanner.nextLine();
		
		String[]temp =h.split(" ");
		int W = Integer.parseInt(temp[0]);
		int H = Integer.parseInt(temp[1]);
		
		
		while((300 >= W  && 1 <= W )&&(300>= H  &&1 <= H )){
			
			for (int x=0;x<W;x++){
				for (int y=1;y<H;y++){
					System.out.print("#");}
					System.out.println("#");}
			 System.out.println("");
			  h = scanner.nextLine();
				
				String[]temp1 =h.split(" ");
			 W = Integer.parseInt(temp1[0]);
			 H = Integer.parseInt(temp1[1]);
			}
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String h = scanner.nextLine();
		
		String[]temp =h.split(" ");
		int W = Integer.parseInt(temp[0]);
		int H = Integer.parseInt(temp[1]);
		
		
		while((300 >= W  && 1 <= W )&&(300>= H  &&1 <= H )){
			
			for (int x=0;x<W;x++){
				for (int y=1;y<H;y++){
					System.out.print("#");}
					System.out.println("#");}
			 System.out.println("");
			  h = scanner.nextLine();
				
				String[]temp1 =h.split(" ");
			 W = Integer.parseInt(temp1[0]);
			 H = Integer.parseInt(temp1[1]);
			}
	}
} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String h = scanner.nextLine();
		
		String[]temp =h.split(" ");
		int W = Integer.parseInt(temp[0]);
		int H = Integer.parseInt(temp[1]);
		
		
		while((300 >= W  && 1 <= W )&&(300>= H  &&1 <= H )){
			
			for (int x=0;x<W;x++){
				for (int y=1;y<H;y++){
					System.out.print("#");}
					System.out.println("#");}
			 System.out.println("");
			  h = scanner.nextLine();
				
				String[]temp1 =h.split(" ");
			 W = Integer.parseInt(temp1[0]);
			 H = Integer.parseInt(temp1[1]);
			}
	} main {
		Scanner scanner = new Scanner(System.in);
		String h = scanner.nextLine();
		
		String[]temp =h.split(" ");
		int W = Integer.parseInt(temp[0]);
		int H = Integer.parseInt(temp[1]);
		
		
		while((300 >= W  && 1 <= W )&&(300>= H  &&1 <= H )){
			
			for (int x=0;x<W;x++){
				for (int y=1;y<H;y++){
					System.out.print("#");}
					System.out.println("#");}
			 System.out.println("");
			  h = scanner.nextLine();
				
				String[]temp1 =h.split(" ");
			 W = Integer.parseInt(temp1[0]);
			 H = Integer.parseInt(temp1[1]);
			}
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String h = scanner.nextLine(); h scanner.nextLine() scanner.nextLine scanner String[]temp =h.split(" "); temp h.split(" ") h.split h " " int W = Integer.parseInt(temp[0]); W Integer.parseInt(temp[0]) Integer.parseInt Integer temp[0] temp 0 int H = Integer.parseInt(temp[1]); H Integer.parseInt(temp[1]) Integer.parseInt Integer temp[1] temp 1 while((300 >= W  && 1 <= W )&&(300>= H  &&1 <= H )){
			
			for (int x=0;x<W;x++){
				for (int y=1;y<H;y++){
					System.out.print("#");}
					System.out.println("#");}
			 System.out.println("");
			  h = scanner.nextLine();
				
				String[]temp1 =h.split(" ");
			 W = Integer.parseInt(temp1[0]);
			 H = Integer.parseInt(temp1[1]);
			} (300 >= W  && 1 <= W )&&(300>= H  &&1 <= H ) (300 >= W  && 1 <= W ) 300 >= W 300 W 1 <= W 1 W (300>= H  &&1 <= H ) 300>= H 300 H 1 <= H 1 H {
			
			for (int x=0;x<W;x++){
				for (int y=1;y<H;y++){
					System.out.print("#");}
					System.out.println("#");}
			 System.out.println("");
			  h = scanner.nextLine();
				
				String[]temp1 =h.split(" ");
			 W = Integer.parseInt(temp1[0]);
			 H = Integer.parseInt(temp1[1]);
			} for (int x=0;x<W;x++){
				for (int y=1;y<H;y++){
					System.out.print("#");}
					System.out.println("#");} int x=0; int x=0; x 0 x<W x W x++ x++ x {
				for (int y=1;y<H;y++){
					System.out.print("#");}
					System.out.println("#");} {
				for (int y=1;y<H;y++){
					System.out.print("#");}
					System.out.println("#");} for (int y=1;y<H;y++){
					System.out.print("#");} int y=1; int y=1; y 1 y<H y H y++ y++ y {
					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 "" h = scanner.nextLine() h scanner.nextLine() scanner.nextLine scanner String[]temp1 =h.split(" "); temp1 h.split(" ") h.split h " " W = Integer.parseInt(temp1[0]) W Integer.parseInt(temp1[0]) Integer.parseInt Integer temp1[0] temp1 0 H = Integer.parseInt(temp1[1]) H Integer.parseInt(temp1[1]) Integer.parseInt Integer temp1[1] temp1 1 String[] args args public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String h = scanner.nextLine();
		
		String[]temp =h.split(" ");
		int W = Integer.parseInt(temp[0]);
		int H = Integer.parseInt(temp[1]);
		
		
		while((300 >= W  && 1 <= W )&&(300>= H  &&1 <= H )){
			
			for (int x=0;x<W;x++){
				for (int y=1;y<H;y++){
					System.out.print("#");}
					System.out.println("#");}
			 System.out.println("");
			  h = scanner.nextLine();
				
				String[]temp1 =h.split(" ");
			 W = Integer.parseInt(temp1[0]);
			 H = Integer.parseInt(temp1[1]);
			}
	}
} public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String h = scanner.nextLine();
		
		String[]temp =h.split(" ");
		int W = Integer.parseInt(temp[0]);
		int H = Integer.parseInt(temp[1]);
		
		
		while((300 >= W  && 1 <= W )&&(300>= H  &&1 <= H )){
			
			for (int x=0;x<W;x++){
				for (int y=1;y<H;y++){
					System.out.print("#");}
					System.out.println("#");}
			 System.out.println("");
			  h = scanner.nextLine();
				
				String[]temp1 =h.split(" ");
			 W = Integer.parseInt(temp1[0]);
			 H = Integer.parseInt(temp1[1]);
			}
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String h = scanner.nextLine();
		
		String[]temp =h.split(" ");
		int W = Integer.parseInt(temp[0]);
		int H = Integer.parseInt(temp[1]);
		
		
		while((300 >= W  && 1 <= W )&&(300>= H  &&1 <= H )){
			
			for (int x=0;x<W;x++){
				for (int y=1;y<H;y++){
					System.out.print("#");}
					System.out.println("#");}
			 System.out.println("");
			  h = scanner.nextLine();
				
				String[]temp1 =h.split(" ");
			 W = Integer.parseInt(temp1[0]);
			 H = Integer.parseInt(temp1[1]);
			}
	}
}