#include <bits/stdc++.h>
using namespace std;
int a[100][100];
void check_row(int n, int m, vector<pair<char, int> >& vp) {
  for (int i = 0; i < n; i++) {
    int x = INT_MAX;
    for (int j = 0; j < m; j++) {
      x = min(x, a[i][j]);
    }
    int y = x;
    if (x != 0)
      for (int j = 0; j < m; j++) {
        a[i][j] -= x;
      }
    while (y--) vp.push_back(make_pair('r', i));
  }
}
void check_col(int n, int m, vector<pair<char, int> >& vp) {
  for (int i = 0; i < m; i++) {
    int x = INT_MAX;
    for (int j = 0; j < n; j++) {
      x = min(x, a[j][i]);
    }
    int y = x;
    if (x != 0)
      for (int j = 0; j < n; j++) {
        a[j][i] -= x;
      }
    while (y--) vp.push_back(make_pair('c', i));
  }
}
int main() {
  ios::sync_with_stdio(false);
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) cin >> a[i][j];
  int x = INT_MAX;
  vector<pair<char, int> > vp;
  if (n > m) {
    check_col(n, m, vp);
    check_row(n, m, vp);
  } else {
    check_row(n, m, vp);
    check_col(n, m, vp);
  }
  for (int i = 0; i < n; i++) {
    x = -1;
    for (int j = 0; j < m; j++) {
      if (max(a[i][j], x) > 0) {
        cout << "-1";
        return 0;
      }
    }
  }
  cout << vp.size() << endl;
  for (int i = 0; i < vp.size(); i++) {
    if (vp[i].first == 'r')
      cout << "row " << vp[i].second + 1 << endl;
    else
      cout << "col " << vp[i].second + 1 << endl;
  }
  return 0;
}
