#include <bits/stdc++.h>
using namespace std;
int n, m;
int a[100][100];
vector<int> r, c;
void solvec(int a[100][100], vector<int> moves) {
  int minrow;
  for (int j = 0; j < m; j++) {
    minrow = 501;
    for (int i = 0; i < n; i++) {
      if (a[i][j] < minrow) {
        minrow = a[i][j];
      }
    }
    for (int i = 0; i < n; i++) {
      a[i][j] -= minrow;
    }
    for (int i = 0; i < minrow; i++) {
      c.push_back(j);
    }
  }
}
void solver(int a[100][100], vector<int> moves) {
  int minrow;
  for (int i = 0; i < n; i++) {
    minrow = 501;
    for (int j = 0; j < m; j++) {
      if (a[i][j] < minrow) {
        minrow = a[i][j];
      }
    }
    for (int j = 0; j < m; j++) {
      a[i][j] -= minrow;
    }
    for (int j = 0; j < minrow; j++) {
      r.push_back(i);
    }
  }
}
int main(int argc, char* argv[]) {
  std::ios::sync_with_stdio(false);
  vector<int> moves;
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cin >> a[i][j];
    }
  }
  if (n > m) {
    solvec(a, moves);
    solver(a, moves);
  } else {
    solver(a, moves);
    solvec(a, moves);
  }
  int ok = 1;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (a[i][j] != 0) {
        ok = 0;
      }
    }
  }
  if (ok == 1) {
    cout << r.size() + c.size() << endl;
    for (int i = 0; i < r.size(); i++) {
      cout << "row " << r[i] + 1 << endl;
    }
    for (int i = 0; i < c.size(); i++) {
      cout << "col " << c[i] + 1 << endl;
    }
  } else {
    cout << -1;
  }
  return 0;
}
