blablabla a,b=map(int,input().split()) s=0 for i in range(1,b+1): for j in range(1,a+1): s+=1 if s%b==0: print(‘PUM’) else: print(s,end=” “)