n,m = map(int,input().split()) s1 = 1 s2 = m for i in range(1,n + 1): for j in range(s1,s2): if j % s2 == 0: break print(j,end = ‘ ‘) print(“PUM”) s1 = s2 + 1 s2 += m