#include <bits/stdc++.h>
using namespace std;
int a[105][105];
queue<string> q1;
queue<int> q2;
int n, m;
void xiao_hang() {
  for (int i = 1; i <= n; i++) {
    int mn = 0x3f3f3f3f;
    for (int j = 1; j <= m; j++) {
      mn = min(mn, a[i][j]);
    }
    while (mn > 0) {
      q1.push("row");
      q2.push(i);
      for (int j = 1; j <= m; j++) {
        a[i][j]--;
      }
      mn--;
    }
  }
}
void xiao_lie() {
  for (int i = 1; i <= m; i++) {
    int mn = 0x3f3f3f3f;
    for (int j = 1; j <= n; j++) {
      mn = min(mn, a[j][i]);
    }
    while (mn > 0) {
      q1.push("col");
      q2.push(i);
      for (int j = 1; j <= n; j++) {
        a[j][i]--;
      }
      mn--;
    }
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      scanf("%d", &a[i][j]);
    }
  }
  int flag = 0;
  if (n < m) {
    xiao_hang();
    xiao_lie();
  } else {
    xiao_lie();
    xiao_hang();
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (a[i][j] != 0) flag = 1;
    }
  }
  if (flag) {
    printf("-1\n");
  } else {
    printf("%d\n", q1.size());
    while (!q1.empty()) {
      printf("%s %d\n", q1.front().c_str(), q2.front());
      q1.pop();
      q2.pop();
    }
  }
  return 0;
}
