#include <bits/stdc++.h>
using namespace std;
const int maxn = 100 + 10;
int n, m;
int g[maxn][maxn];
int path[maxn];
int res;
int k;
int nextpath[maxn][maxn][15 * 110 + 1];
int dp[maxn][maxn][15 * 110 + 1];
int main() {
  memset(dp, -1, sizeof(dp));
  scanf("%d %d %d", &n, &m, &k);
  for (int i = 0; i < n; ++i) {
    string s;
    cin >> s;
    for (int j = 0; j < m; ++j) {
      g[i][j] = s[j] - '0';
    }
  }
  for (int j = 0; j < m; ++j) {
    dp[0][j][g[0][j]] = 1;
  }
  for (int i = 1; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      for (int s = g[i][j]; s <= 15 * 110; s++) {
        if (j - 1 >= 0 && dp[i - 1][j - 1][s - g[i][j]] == 1) {
          dp[i][j][s] = 1;
          nextpath[i][j][s] = j - 1;
          continue;
        }
        if (j + 1 < m && dp[i - 1][j + 1][s - g[i][j]] == 1) {
          dp[i][j][s] = 1;
          nextpath[i][j][s] = j + 1;
        }
      }
    }
  }
  for (int sum = 15 * 110; sum >= 0; --sum) {
    if (sum % (k + 1) != 0) continue;
    for (int j = 0; j < m; ++j) {
      if (dp[n - 1][j][sum] == 1) {
        printf("%d\n", sum);
        printf("%d\n", j + 1);
        string rl;
        int col = j;
        int t = sum;
        for (int i = n - 1; i > 0; --i) {
          int nextcol = nextpath[i][col][t];
          if (nextcol > col)
            rl += 'R';
          else
            rl += 'L';
          t -= g[i][col];
          col = nextcol;
        }
        cout << rl;
        return 0;
      }
    }
  }
  printf("-1");
  return 0;
}
