```cpp
include[HTML_REMOVED]
using namespace std;
int main(){
int n,m;
cin>>n>>m;
for(int i=1;i<=n*m;i++){
if(i%m==0){//此处记得把例子的具体数换成输入的变量名
cout<<"PUM"<<endl;
continue;
}
cout<<i<<' ';
}
return 0;
}