#include <bits/stdc++.h>
using namespace std;
const int inf = INT_MAX;
const int maxn = 107;
int n, m, a[maxn][maxn], row[maxn], col[maxn];
struct NODE {
  int index;
  char rc;
  NODE() {}
  NODE(int idx, char _) { index = idx, rc = _; }
  friend bool operator<(NODE a, NODE b) {
    int al, bl;
    if (a.rc == 'r') {
      al = row[a.index];
    } else {
      al = col[a.index];
    }
    if (b.rc == 'r') {
      bl = row[b.index];
    } else {
      bl = col[b.index];
    }
    if (al == bl) {
      if (n >= m) {
        if (a.rc == 'r' && b.rc == 'c') {
          return true;
        } else
          return false;
      } else {
        if (a.rc == 'c' && b.rc == 'r') {
          return true;
        } else
          return false;
      }
    }
    return al > bl;
  }
};
string num2str(int i) {
  stringstream ss;
  ss << i;
  return ss.str();
}
int main() {
  while (cin >> n >> m) {
    vector<string> ans;
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= m; j++) {
        cin >> a[i][j];
      }
    }
    priority_queue<NODE> q;
    do {
      if (!q.empty()) {
        NODE top = q.top();
        q.pop();
        if (top.rc == 'r') {
          int i = top.index;
          int val = row[i];
          for (int j = 1; j <= m; j++) {
            a[i][j] -= val;
          }
          while (val--) ans.push_back("row " + num2str(i));
        } else {
          int j = top.index;
          int val = col[j];
          for (int i = 1; i <= n; i++) {
            a[i][j] -= val;
          }
          while (val--) ans.push_back("col " + num2str(j));
        }
      }
      while (!q.empty()) q.pop();
      for (int i = 1; i <= n; i++) {
        row[i] = inf;
        for (int j = 1; j <= m; j++) {
          if (a[i][j] < row[i]) row[i] = a[i][j];
        }
        if (row[i]) {
          q.push(NODE(i, 'r'));
        }
      }
      for (int j = 1; j <= m; j++) {
        col[j] = inf;
        for (int i = 1; i <= n; i++) {
          if (a[i][j] < col[j]) col[j] = a[i][j];
        }
        if (col[j]) {
          q.push(NODE(j, 'c'));
        }
      }
    } while (!q.empty());
    int flag = 0;
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= m; j++) {
        if (a[i][j]) flag = 1;
      }
    }
    if (flag) {
      cout << -1 << endl;
    } else {
      int len = ans.size();
      cout << len << endl;
      for (int i = 0; i < len; i++) {
        cout << ans[i] << endl;
      }
    }
  }
  return 0;
}
