#include <bits/stdc++.h>
using namespace std;
int arr[103][103];
int n, m;
vector<int> vec2;
vector<char> vec1;
bool valid() {
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++)
      if (arr[i][j] != 0) return 0;
  }
  return 1;
}
bool bisa_col(int x) {
  for (int i = 1; i <= n; i++)
    if (arr[i][x] <= 0) return 0;
  return 1;
}
bool bisa_row(int x) {
  for (int i = 1; i <= m; i++)
    if (arr[x][i] <= 0) return 0;
  return 1;
}
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) scanf("%d", &arr[i][j]);
  }
  if (n >= m) {
    for (int i = 1; i <= m; i++) {
      while (bisa_col(i)) {
        for (int j = 1; j <= n; j++) arr[j][i]--;
        vec1.push_back('c');
        vec2.push_back(i);
      }
    }
    for (int i = 1; i <= n; i++) {
      while (bisa_row(i)) {
        for (int j = 1; j <= m; j++) arr[i][j]--;
        vec1.push_back('r');
        vec2.push_back(i);
      }
    }
  } else {
    for (int i = 1; i <= n; i++) {
      while (bisa_row(i)) {
        for (int j = 1; j <= m; j++) arr[i][j]--;
        vec1.push_back('r');
        vec2.push_back(i);
      }
    }
    for (int i = 1; i <= m; i++) {
      while (bisa_col(i)) {
        for (int j = 1; j <= n; j++) arr[j][i]--;
        vec1.push_back('c');
        vec2.push_back(i);
      }
    }
  }
  if (!valid()) {
    printf("-1\n");
    return 0;
  }
  printf("%d\n", (int)vec1.size());
  for (int i = 0; i < vec1.size(); i++) {
    if (vec1[i] == 'r')
      printf("row %d\n", vec2[i]);
    else
      printf("col %d\n", vec2[i]);
  }
  return 0;
}
