加油
#include <iostream>
#include <stdio.h>
int main() {
int n, m;
scanf("%d%d", &n, &m);
for (int i = 1; i <= n*m; i++) {
for (int j = i; j % m; j++, i++) {
printf("%d ", j);
}
printf("PUM\n");
}
}