#include <bits/stdc++.h>
using namespace std;
int ara[103][103];
pair<int, int> coOrdinate;
int n, m;
bool RowCheck(int row) {
  for (int i = 1; i <= m; i++) {
    if (ara[row][i] == 0) return false;
  }
  return true;
}
bool ColCheck(int col) {
  for (int i = 1; i <= n; i++) {
    if (ara[i][col] == 0) return false;
  }
  return true;
}
int FindMax() {
  int mx = 0;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (ara[i][j] >= mx) {
        mx = ara[i][j];
        coOrdinate = make_pair(i, j);
      }
    }
  }
  return mx;
}
void GoRow(int row) {
  for (int i = 1; i <= m; i++) ara[row][i]--;
}
void GoCol(int col) {
  for (int i = 1; i <= n; i++) ara[i][col]--;
}
int main() {
  scanf("%d %d", &n, &m);
  int mx = -1;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      scanf("%d", &ara[i][j]);
    }
  }
  mx = FindMax();
  int k = 0;
  vector<pair<string, int> > v;
  while (1) {
    if (mx != 0) {
      bool R = RowCheck(coOrdinate.first);
      bool C = ColCheck(coOrdinate.second);
      if (!R && !C)
        break;
      else if (R && !C) {
        GoRow(coOrdinate.first);
        v.push_back(make_pair("row", coOrdinate.first));
        k++;
      } else if (!R && C) {
        GoCol(coOrdinate.second);
        v.push_back(make_pair("col", coOrdinate.second));
        k++;
      } else {
        if (n < m) {
          GoRow(coOrdinate.first);
          v.push_back(make_pair("row", coOrdinate.first));
          k++;
        } else {
          GoCol(coOrdinate.second);
          v.push_back(make_pair("col", coOrdinate.second));
          k++;
        }
      }
    } else
      break;
    mx = FindMax();
  }
  if (mx != 0)
    cout << -1 << endl;
  else {
    cout << k << endl;
    int len = v.size();
    for (int i = 0; i < len; i++) {
      cout << v[i].first << " " << v[i].second << endl;
    }
    cout << endl;
  }
  return 0;
}
