let num = parseInt(readline());
let arr = [];
let len = arr.length;
while(num>len){
    let child=[]
    if(len===0){
        child=[1]
    }else{			
        child=[arr[len-1][0]+len]
    }	
    for(let i=len,j=0;i<num-1;i++,j++){
        child.push(child[j]+i+2)
    }
    len+=1
    arr.push(child)
}
arr.forEach(item=>{
    console.log(item.join(' '))
})