#include <cstdio>
int main()
{
int a, b, c = 0;
scanf("%d %d", &a, &b);
for (int i = 1; i <= a; i ++)
{
for (int j = 1; j < b; j ++)
{
c += 1;
printf("%d ", c);
}
c += 1;
printf("PUM\n");
}
return 0;
}