#include<iostream> #include<cstdio> using namespace std; int main(){ int n,seed,d[20][20]; scanf("%d%d",&n,&seed); for(int j=0;j<n;j++){ for(int i=0;i<=j;i++){ d[i][j] = seed; seed = seed+1; if(seed==10)seed = 1; } } for(int i=0;i<n;i++){ for(int j=0;j<i;j++) printf(" "); for(int j=i;j<n-1;j++) printf("%d ",d[i][j]); printf("%d\n",d[i][n-1]); } return 0; }