#include <bits/stdc++.h>
using namespace std;
template <class A, class B>
A convert(B x) {
  stringstream s;
  s << x;
  A r;
  s >> r;
  return r;
}
char line[1 << 10];
int n, m, k;
string s[101];
string res;
int r2;
int dp[101][101][901];
int Rec(int r, int c, int t) {
  if (t < 0) return 0;
  if (!r && t) return 0;
  if (!r) return 1;
  int& res = dp[r][c][t];
  if (res != -1) return (int)(res > 0);
  res = 0;
  if (c && Rec(r - 1, c - 1, t - (s[r - 1][c - 1] - '0'))) {
    res = 1;
    return 1;
  }
  if (c < m - 1 && Rec(r - 1, c + 1, t - (s[r - 1][c + 1] - '0'))) {
    res = 2;
    return 1;
  }
  return 0;
}
void PrintWay(int r, int c, int t) {
  if (r < 0) return;
  if (dp[r][c][t] == 1) {
    res += "L";
    PrintWay(r - 1, c - 1, t - (s[r - 1][c - 1] - '0'));
  }
  if (dp[r][c][t] == 2) {
    res += "R";
    PrintWay(r - 1, c + 1, t - (s[r - 1][c + 1] - '0'));
  }
}
bool Try(int t) {
  for (int i = (0), _b(m); i < _b; ++i) {
    if (Rec(n - 1, i, t - (s[n - 1][i] - '0'))) {
      r2 = i + 1;
      res = "";
      PrintWay(n - 1, i, t - (s[n - 1][i] - '0'));
      return true;
    }
  }
  return false;
}
int main() {
  scanf("%d %d %d", &n, &m, &k);
  for (int i = (0), _b(n); i < _b; ++i) {
    scanf("%s", line);
    s[i] = string(line);
  }
  int r1 = -1;
  memset(dp, -1, sizeof(dp));
  for (int i = (901) - 1, _a(0); i >= _a; --i) {
    if (i % (k + 1)) continue;
    if (Try(i)) {
      r1 = i;
      break;
    }
  }
  if (r1 == -1)
    printf("-1\n");
  else
    printf("%d\n%d\n%s\n", r1, r2, res.c_str());
  return 0;
}
