#include<iostream>
#include<cstdio>
using namespace std;
int n,m;
int g[101][101],a[101][101];
int row[101]={0},col[101]={0};
int main()
{
freopen("games.in","r",stdin);
freopen("games.out","w",stdout);
int i,j,z,x,y,q;
x=0;
q=0;
cin>>n>>m;
for (i=1;i<=n;i++)
for (j=1;j<=m;j++)
{cin>>g[i][j];
if (g[i][j]>q)
q=g[i][j];
a[i][j]=0;
}
for (y=1;y<=q;y++)
for (i=1;i<=n;i++)
{
z=0;
for (j=1;j<=m;j++)
if(a[i][j]==g[i][j])
{z=1;
break;
}
if (z==0)
{row[i]=row[i]+1;
x=x+1;
for (j=1;j<=m;j++)
a[i][j]=a[i][j]+1;}
}
for (y=1;y<=q;y++)
for (i=1;i<=m;i++)
{
z=0;
for (j=1;j<=n;j++)
if(a[j][i]==g[j][i])
{
z=1;
break;
}
if (z==0)
{col[i]=col[i]+1;
x=x+1;
for (j=1;j<=n;j++)
a[j][i]=a[j][i]+1;}
}
if (x==0)
cout<<"-1";
else
{
cout<<x<<endl;
for (i=1;i<=n;i++)
if (row[i]>=1)
for (j=1;j<=row[i];j++)
cout<<"row "<<i<<endl;
for (i=1;i<=m;i++)
if (col[i]>=1)
for (j=1;j<=col[i];j++)
cout<<"col "<<i<<endl;
}
fclose(stdin);fclose(stdout);
}