func_code_string: #include <bits/stdc++.h>   using namespace std;   int dp[128][128][15];   int board[128][128];   int dy[] = {-1, 1};   int N, M, K;   int solve(int x, int y, int k) {     if (dp[x][y][k] != -2) return dp[x][y][k];     if (x == 0) {       if (board[x][y] % K == k)         return dp[x][y][k] = board[x][y];       else         return dp[x][y][k] = -1;     }     int curr = board[x][y];     int ans = -1;     int req = (K + k - (curr % K)) % K;     for (int i = 0; i < 2; i++) {       int nx = x - 1, ny = y + dy[i];       if (nx < 0 || ny < 0 || nx >= N || ny >= M) continue;       int ret = solve(nx, ny, req);       if (ret != -1) {         ans = max(ans, curr + ret);       }     }     return dp[x][y][k] = ans;   }   void print(int x, int y, int k) {     int curr = board[x][y];     int req = (K + k - (curr % K)) % K;     for (int i = 0; i < 2; i++) {       int nx = x - 1, ny = y + dy[i];       if (nx < 0 || ny < 0 || nx >= N || ny >= M) continue;       if (dp[x][y][k] == curr + dp[nx][ny][req]) {         if (i == 0)           cout <<  L ;         else           cout <<  R ;         print(nx, ny, req);         return;       }     }   }   int main() {     cin >> N >> M >> K;     K += 1;     for (int i = 0; i < N; i++) {       string s;       cin >> s;       for (int j = 0; j < M; j++) board[i][j] = s[j] -  0 ;     }     for (int i = 0; i < N; i++)       for (int j = 0; j < M; j++)         for (int k = 0; k < K; k++) dp[i][j][k] = -2;     int ans = -1;     int maxI = 0;     for (int i = 0; i < M; i++) {       int ret = solve(N - 1, i, 0);       if (ret != -1 && ret > ans) {         ans = ret;         maxI = i;       }     }     if (ans == -1) {       cout << -1 << endl;       return 0;     }     cout << ans << endl;     cout << maxI + 1 << endl;     print(N - 1, maxI, 0);     cout << endl;     return 0;   }   