function Main(input){
  let data = input.split('\n');
  let arr, row, col;
  for (let i = 0; i < data.length; i++){
    arr = data[i].split(' ');
    row = arr[0];
    col = arr[1];
    if (row === '0' && col === '0'){
      break;
    }
    let s ='';
    for (let j = 0; j < col; j++){
      s += "#";
    }
    for (let k = 0; k < row; k++){
      console.log(s);
    }
    console.log('');
    }
  }

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
