const line = parseInt(readline())
const arr = []
let current = 0;
for( let step = 0; step < line; step++ ) {
for( let i = 0; i <= step; i++ ) {
const j = step - i
if( !arr[j] ) {
arr[j] = []
}
current++
arr[j][i] = current
}
}
arr.forEach( item => {
const str = item.join(" ")
console.log( str )
})

京公网安备 11010502036488号