Problem:
Print a Rectangle

Draw a rectangle which has a height of H cm and a width of W cm. Draw a 1-cm square by single '#'.

Input

The input consists of multiple datasets. Each dataset consists of two integers H and W separated by a single space.

The input ends with two 0 (when both H and W are zero).

Output

For each dataset, print the rectangle made of H × W '#'.

Print a blank line after each dataset.

Constraints

1 ≤ H ≤ 300

1 ≤ W ≤ 300

Sample Input

3 4
5 6
2 2
0 0

Sample Output

####
####
####

######
######
######
######
######

##
##

Solution in JavaScript (judge verdict: Wrong Answer)

let fs = require('fs');

const readFile = path => {
  fs.readFile(path, 'utf8', (err, data) => {
    lines = data.split("\n");
    lines = lines.map(line => line.split(" "));
    lines = lines.map(line => line.map(elem => parseInt(elem)));
    for(let i = 0; i < lines.length; i++) {
      let str = "";
      if(!lines[i][0]) return;
      for(let j = 0; j < lines[i][0]; j++) {
        for(let k = 0; k < lines[i][1]; k++) {
          str += "#";
        }
        console.log(str);
        str = "";
      }
      console.log("");
    }
  });
}

let sampleInputPath = "";

if(process.argv.length > 2) {
  sampleInputPath = process.argv[2];
  readFile(sampleInputPath);
}