import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
public class Main {

	public static void main(String[] args) throws IOException{
		BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
		ArrayList<String> list = new ArrayList<String>();
		
		while(true){
			String str = br.readLine();
			if("0 0".equals(str)) break;
			list.add(str);
		}
		
		for(int i = 0 ; i <list.size() ; i++){
			String[] stra = list.get(i).split(" ");
			int h = Integer.parseInt(stra[0]);
			int w = Integer.parseInt(stra[1]);
			for(int j = 0 ; j < h ;j++){
				for(int k = 0 ; k < w ;k++){
					System.out.print("#");
				}
				System.out.println();
			}
			System.out.println();
		}
	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.ArrayList; ArrayList java.util public class Main {

	public static void main(String[] args) throws IOException{
		BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
		ArrayList<String> list = new ArrayList<String>();
		
		while(true){
			String str = br.readLine();
			if("0 0".equals(str)) break;
			list.add(str);
		}
		
		for(int i = 0 ; i <list.size() ; i++){
			String[] stra = list.get(i).split(" ");
			int h = Integer.parseInt(stra[0]);
			int w = Integer.parseInt(stra[1]);
			for(int j = 0 ; j < h ;j++){
				for(int k = 0 ; k < w ;k++){
					System.out.print("#");
				}
				System.out.println();
			}
			System.out.println();
		}
	}

} Main public static void main(String[] args) throws IOException{
		BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
		ArrayList<String> list = new ArrayList<String>();
		
		while(true){
			String str = br.readLine();
			if("0 0".equals(str)) break;
			list.add(str);
		}
		
		for(int i = 0 ; i <list.size() ; i++){
			String[] stra = list.get(i).split(" ");
			int h = Integer.parseInt(stra[0]);
			int w = Integer.parseInt(stra[1]);
			for(int j = 0 ; j < h ;j++){
				for(int k = 0 ; k < w ;k++){
					System.out.print("#");
				}
				System.out.println();
			}
			System.out.println();
		}
	} main {
		BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
		ArrayList<String> list = new ArrayList<String>();
		
		while(true){
			String str = br.readLine();
			if("0 0".equals(str)) break;
			list.add(str);
		}
		
		for(int i = 0 ; i <list.size() ; i++){
			String[] stra = list.get(i).split(" ");
			int h = Integer.parseInt(stra[0]);
			int w = Integer.parseInt(stra[1]);
			for(int j = 0 ; j < h ;j++){
				for(int k = 0 ; k < w ;k++){
					System.out.print("#");
				}
				System.out.println();
			}
			System.out.println();
		}
	} BufferedReader br =new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) ArrayList<String> list = new ArrayList<String>(); list new ArrayList<String>() while(true){
			String str = br.readLine();
			if("0 0".equals(str)) break;
			list.add(str);
		} true {
			String str = br.readLine();
			if("0 0".equals(str)) break;
			list.add(str);
		} String str = br.readLine(); str br.readLine() br.readLine br if("0 0".equals(str)) break; "0 0".equals(str) "0 0".equals "0 0" str break; list.add(str) list.add list str for(int i = 0 ; i <list.size() ; i++){
			String[] stra = list.get(i).split(" ");
			int h = Integer.parseInt(stra[0]);
			int w = Integer.parseInt(stra[1]);
			for(int j = 0 ; j < h ;j++){
				for(int k = 0 ; k < w ;k++){
					System.out.print("#");
				}
				System.out.println();
			}
			System.out.println();
		} int i = 0 ; int i = 0 ; i 0 i <list.size() i list.size() list.size list i++ i++ i {
			String[] stra = list.get(i).split(" ");
			int h = Integer.parseInt(stra[0]);
			int w = Integer.parseInt(stra[1]);
			for(int j = 0 ; j < h ;j++){
				for(int k = 0 ; k < w ;k++){
					System.out.print("#");
				}
				System.out.println();
			}
			System.out.println();
		} {
			String[] stra = list.get(i).split(" ");
			int h = Integer.parseInt(stra[0]);
			int w = Integer.parseInt(stra[1]);
			for(int j = 0 ; j < h ;j++){
				for(int k = 0 ; k < w ;k++){
					System.out.print("#");
				}
				System.out.println();
			}
			System.out.println();
		} String[] stra = list.get(i).split(" "); stra list.get(i).split(" ") list.get(i).split list.get(i) list.get list i " " int h = Integer.parseInt(stra[0]); h Integer.parseInt(stra[0]) Integer.parseInt Integer stra[0] stra 0 int w = Integer.parseInt(stra[1]); w Integer.parseInt(stra[1]) Integer.parseInt Integer stra[1] stra 1 for(int j = 0 ; j < h ;j++){
				for(int k = 0 ; k < w ;k++){
					System.out.print("#");
				}
				System.out.println();
			} int j = 0 ; int j = 0 ; j 0 j < h j h j++ j++ j {
				for(int k = 0 ; k < w ;k++){
					System.out.print("#");
				}
				System.out.println();
			} {
				for(int k = 0 ; k < w ;k++){
					System.out.print("#");
				}
				System.out.println();
			} for(int k = 0 ; k < w ;k++){
					System.out.print("#");
				} int k = 0 ; int k = 0 ; k 0 k < w k w k++ k++ k {
					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) throws IOException{
		BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
		ArrayList<String> list = new ArrayList<String>();
		
		while(true){
			String str = br.readLine();
			if("0 0".equals(str)) break;
			list.add(str);
		}
		
		for(int i = 0 ; i <list.size() ; i++){
			String[] stra = list.get(i).split(" ");
			int h = Integer.parseInt(stra[0]);
			int w = Integer.parseInt(stra[1]);
			for(int j = 0 ; j < h ;j++){
				for(int k = 0 ; k < w ;k++){
					System.out.print("#");
				}
				System.out.println();
			}
			System.out.println();
		}
	}

} public class Main {

	public static void main(String[] args) throws IOException{
		BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
		ArrayList<String> list = new ArrayList<String>();
		
		while(true){
			String str = br.readLine();
			if("0 0".equals(str)) break;
			list.add(str);
		}
		
		for(int i = 0 ; i <list.size() ; i++){
			String[] stra = list.get(i).split(" ");
			int h = Integer.parseInt(stra[0]);
			int w = Integer.parseInt(stra[1]);
			for(int j = 0 ; j < h ;j++){
				for(int k = 0 ; k < w ;k++){
					System.out.print("#");
				}
				System.out.println();
			}
			System.out.println();
		}
	}

} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
public class Main {

	public static void main(String[] args) throws IOException{
		BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
		ArrayList<String> list = new ArrayList<String>();
		
		while(true){
			String str = br.readLine();
			if("0 0".equals(str)) break;
			list.add(str);
		}
		
		for(int i = 0 ; i <list.size() ; i++){
			String[] stra = list.get(i).split(" ");
			int h = Integer.parseInt(stra[0]);
			int w = Integer.parseInt(stra[1]);
			for(int j = 0 ; j < h ;j++){
				for(int k = 0 ; k < w ;k++){
					System.out.print("#");
				}
				System.out.println();
			}
			System.out.println();
		}
	}

}