#include <bits/stdc++.h>
using namespace std;
int g[102][102];
int maps[102][102];
int row[102], col[102];
vector<pair<string, int> > solution;
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      scanf("%d", &g[i][j]);
    }
  }
  if (n <= m) {
    while (1) {
      int flag = 0;
      int real_flag;
      for (int i = 0; i < n; i++) {
        real_flag = 0;
        for (int j = 0; j < m; j++) {
          if (g[i][j] == 0) {
            flag++;
            real_flag = 1;
            break;
          }
        }
        if (real_flag == 0) {
          for (int j = 0; j < m; j++) {
            g[i][j] = g[i][j] - 1;
          }
          solution.push_back(make_pair("row", i + 1));
        }
      }
      if (flag == n) break;
    }
    while (1) {
      int flag = 0;
      int real_flag;
      for (int i = 0; i < m; i++) {
        real_flag = 0;
        for (int j = 0; j < n; j++) {
          if (g[j][i] == 0) {
            flag++;
            real_flag = 1;
            break;
          }
        }
        if (real_flag == 0) {
          for (int j = 0; j < n; j++) {
            g[j][i] = g[j][i] - 1;
          }
          solution.push_back(make_pair("col", i + 1));
        }
      }
      if (flag == m) break;
    }
  } else {
    while (1) {
      int flag = 0;
      int real_flag;
      for (int i = 0; i < m; i++) {
        real_flag = 0;
        for (int j = 0; j < n; j++) {
          if (g[j][i] == 0) {
            flag++;
            real_flag = 1;
            break;
          }
        }
        if (real_flag == 0) {
          for (int j = 0; j < n; j++) {
            g[j][i] = g[j][i] - 1;
          }
          solution.push_back(make_pair("col", i + 1));
        }
      }
      if (flag == m) break;
    }
    while (1) {
      int flag = 0;
      int real_flag;
      for (int i = 0; i < n; i++) {
        real_flag = 0;
        for (int j = 0; j < m; j++) {
          if (g[i][j] == 0) {
            flag++;
            real_flag = 1;
            break;
          }
        }
        if (real_flag == 0) {
          for (int j = 0; j < m; j++) {
            g[i][j] = g[i][j] - 1;
          }
          solution.push_back(make_pair("row", i + 1));
        }
      }
      if (flag == n) break;
    }
  }
  int ans = 0;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (g[i][j] != 0) {
        ans = -1;
        break;
      }
    }
  }
  if (ans != -1) {
    ans = solution.size();
    printf("%d\n", ans);
    for (int i = 0; i < solution.size(); i++) {
      cout << solution[i].first << " " << solution[i].second << '\n';
    }
  } else
    printf("%d\n", ans);
}
