#include <bits/stdc++.h>
using namespace std;
int inf = 1000000000;
string alp = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
int main(void) {
  int n, m;
  cin >> n >> m;
  vector<vector<int> > g(n, vector<int>(m));
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) cin >> g[i][j];
  int l = 0;
  vector<pair<string, int> > ans;
  while (l < 10000) {
    int cnt = 0;
    for (int i = 0; i < n; i++)
      for (int j = 0; j < m; j++) cnt += g[i][j];
    if (cnt == 0) break;
    if (n < m) {
      while (true) {
        int a = ans.size();
        for (int i = 0; i < n; i++) {
          bool f = true;
          for (int j = 0; j < m; j++) {
            if (g[i][j] == 0) f = false;
          }
          if (f) {
            ans.push_back(make_pair("row", i + 1));
            for (int j = 0; j < m; j++) g[i][j]--;
          }
        }
        if (a == ans.size()) break;
      }
      while (true) {
        int a = ans.size();
        for (int j = 0; j < m; j++) {
          bool f = true;
          for (int i = 0; i < n; i++) {
            if (g[i][j] == 0) f = false;
          }
          if (f) {
            ans.push_back(make_pair("col", j + 1));
            for (int i = 0; i < n; i++) g[i][j]--;
          }
        }
        if (a == ans.size()) break;
      }
    } else {
      while (true) {
        int a = ans.size();
        for (int j = 0; j < m; j++) {
          bool f = true;
          for (int i = 0; i < n; i++) {
            if (g[i][j] == 0) f = false;
          }
          if (f) {
            ans.push_back(make_pair("col", j + 1));
            for (int i = 0; i < n; i++) g[i][j]--;
          }
        }
        if (a == ans.size()) break;
      }
      while (true) {
        int a = ans.size();
        for (int i = 0; i < n; i++) {
          bool f = true;
          for (int j = 0; j < m; j++) {
            if (g[i][j] == 0) f = false;
          }
          if (f) {
            ans.push_back(make_pair("row", i + 1));
            for (int j = 0; j < m; j++) g[i][j]--;
          }
        }
        if (a == ans.size()) break;
      }
    }
    l++;
  }
  if (l >= 9999) {
    cout << -1 << endl;
    return 0;
  }
  cout << ans.size() << endl;
  for (int i = 0; i < ans.size(); i++) {
    cout << ans[i].first << " " << ans[i].second << endl;
  }
  return 0;
}
