const rl = require("readline").createInterface({ input: process.stdin });
var iter = rl[Symbol.asyncIterator]();
const readline = async () => (await iter.next()).value;
void (async function () {
// Write your code here
function Solution(round) {
let limit = round;
let offset = 0;
let result = [];
while (limit >= 1) {
let line = [];
for (let i = round - limit + 1; i <= round; i++) {
line.push((((1 + i) * i) / 2) - offset);
}
result.push(line);
limit--;
offset++;
}
return result;
}
while ((line = await readline())) {
let tokens = line.split(" ");
let param = parseInt(tokens[0]);
let s = Solution(param)
for(const a of s){
console.log(a.join(' '))
}
}
})();