#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
struct node {
  char ch[10];
  int num;
} opera[400000];
int n, m, a[110], b[110], maze[110][110];
int main() {
  int i, j;
  while (scanf("%d%d", &n, &m) != EOF) {
    int minx, miny, p, k = 1;
    for (i = 1; i <= n; i++) {
      for (j = 1; j <= m; j++) {
        scanf("%d", &maze[i][j]);
      }
    }
    if (n <= m) {
      p = 1;
      for (i = 1; i <= n; i++) {
        minx = inf;
        for (j = 1; j <= m; j++) {
          minx = min(minx, maze[i][j]);
        }
        a[p++] = minx;
      }
      int k = 1;
      for (i = 1; i <= n; i++) {
        if (a[i]) {
          for (j = 1; j <= m; j++) maze[i][j] -= a[i];
          while (a[i]) {
            strcpy(opera[k].ch, "row");
            opera[k++].num = i;
            a[i]--;
          }
        }
      }
      p = 1;
      for (j = 1; j <= m; j++) {
        miny = inf;
        for (i = 1; i <= n; i++) {
          miny = min(miny, maze[i][j]);
        }
        b[p++] = miny;
      }
      for (j = 1; j <= m; j++) {
        if (b[j]) {
          for (i = 1; i <= n; i++) maze[i][j] -= b[j];
          while (b[j]) {
            strcpy(opera[k].ch, "col");
            opera[k++].num = j;
            b[j]--;
          }
        }
      }
      int flag = 0;
      for (i = 1; i <= n; i++) {
        for (j = 1; j <= m; j++)
          if (maze[i][j]) flag = 1;
      }
      if (flag == 1)
        printf("-1\n");
      else {
        printf("%d\n", k - 1);
        for (i = 1; i < k; i++) printf("%s %d\n", opera[i].ch, opera[i].num);
      }
    } else {
      p = 1;
      for (j = 1; j <= m; j++) {
        miny = inf;
        for (i = 1; i <= n; i++) {
          miny = min(miny, maze[i][j]);
        }
        b[p++] = miny;
      }
      for (j = 1; j <= m; j++) {
        if (b[j]) {
          for (i = 1; i <= n; i++) maze[i][j] -= b[j];
          while (b[j]) {
            strcpy(opera[k].ch, "col");
            opera[k++].num = j;
            b[j]--;
          }
        }
      }
      p = 1;
      for (i = 1; i <= n; i++) {
        minx = inf;
        for (j = 1; j <= m; j++) {
          minx = min(minx, maze[i][j]);
        }
        a[p++] = minx;
      }
      for (i = 1; i <= n; i++) {
        if (a[i]) {
          for (j = 1; j <= m; j++) maze[i][j] -= a[i];
          while (a[i]) {
            strcpy(opera[k].ch, "row");
            opera[k++].num = i;
            a[i]--;
          }
        }
      }
      int flag = 0;
      for (i = 1; i <= n; i++) {
        for (j = 1; j <= m; j++)
          if (maze[i][j]) flag = 1;
      }
      if (flag == 1)
        printf("-1\n");
      else {
        printf("%d\n", k - 1);
        for (i = 1; i < k; i++) printf("%s %d\n", opera[i].ch, opera[i].num);
      }
    }
  }
  return 0;
}
