On some square in the lowest row of a chessboard a stands a pawn. It has only two variants of moving: upwards and leftwards or upwards and rightwards. The pawn can choose from which square of the lowest row it can start its journey. On each square lay from 0 to 9 peas. The pawn wants to reach the uppermost row having collected as many peas as possible. As there it will have to divide the peas between itself and its k brothers, the number of peas must be divisible by k + 1. Find the maximal number of peas it will be able to collect and which moves it should make to do it.

The pawn cannot throw peas away or leave the board. When a pawn appears in some square of the board (including the first and last square of the way), it necessarily takes all the peas.

Input

The first line contains three integers n, m, k (2 ≤ n, m ≤ 100, 0 ≤ k ≤ 10) — the number of rows and columns on the chessboard, the number of the pawn's brothers. Then follow n lines containing each m numbers from 0 to 9 without spaces — the chessboard's description. Each square is described by one number — the number of peas in it. The first line corresponds to the uppermost row and the last line — to the lowest row.

Output

If it is impossible to reach the highest row having collected the number of peas divisible by k + 1, print -1. 

Otherwise, the first line must contain a single number — the maximal number of peas the pawn can collect given that the number must be divisible by k + 1. The second line must contain a single number — the number of the square's column in the lowest row, from which the pawn must start its journey. The columns are numbered from the left to the right with integral numbers starting from 1. The third line must contain a line consisting of n - 1 symbols — the description of the pawn's moves. If the pawn must move upwards and leftwards, print L, if it must move upwards and rightwards, print R. If there are several solutions to that problem, print any of them.

Examples

Input

3 3 1
123
456
789


Output

16
2
RL


Input

3 3 0
123
456
789


Output

17
3
LR


Input

2 2 10
98
75


Output

-1
import static java.lang.Math.*;
import java.util.*;
import java.io.*;

@SuppressWarnings("unused")
public class _40_d2_D {

    class Rec {
        int start; String path; int score;
        public Rec(int s, String p, int sc) {
            start=s; path=p; score=sc;
        }
    }

    public void solve() throws Exception {

        int n=nextInt(), m=nextInt(), k=nextInt()+1;
        int[][] board = new int[n][m];
        for (int i=0; i<n; i++) for (int j=0; j<m; j++)
            board[i][j] = nextChar()-48;

        Rec[][] row = new Rec[m][k];
        Rec[][] rowNew = new Rec[m][k];
        
        for (int i=0; i<m; i++) row[i][board[n-1][i]%k] = new Rec(i, "", board[n-1][i]/k);
        for (int pos=n-2; pos>=0; pos--) {
            for (int i=0; i<k; i++) if (row[0][i]!=null) if (rowNew[1][(i+board[pos][1])%k]==null || rowNew[1][(i+board[pos][1])%k].score<row[0][i].score+(i+board[pos][1])/k)
                rowNew[1][(i+board[pos][1])%k] = new Rec(row[0][i].start, row[0][i].path+'R', row[0][i].score+(i+board[pos][1])/k);
            for (int i=0; i<k; i++) if (row[m-1][i]!=null) if (rowNew[m-2][(i+board[pos][m-2])%k]==null || rowNew[m-2][(i+board[pos][m-2])%k].score<row[m-1][i].score+(i+board[pos][m-2])/k)
                rowNew[m-2][(i+board[pos][m-2])%k] = new Rec(row[m-1][i].start, row[m-1][i].path+'L', row[m-1][i].score+(i+board[pos][m-2])/k);
            for (int col=1; col<m-1; col++) for (int i=0; i<k; i++) if (row[col][i]!=null) {
                if (rowNew[col-1][(i+board[pos][col-1])%k]==null || rowNew[col-1][(i+board[pos][col-1])%k].score<row[col][i].score+(i+board[pos][col-1])/k)
                    rowNew[col-1][(i+board[pos][col-1])%k] = new Rec(row[col][i].start, row[col][i].path+'L', row[col][i].score+(i+board[pos][col-1])/k);
                if (rowNew[col+1][(i+board[pos][col+1])%k]==null || rowNew[col+1][(i+board[pos][col+1])%k].score<row[col][i].score+(i+board[pos][col+1])/k)
                    rowNew[col+1][(i+board[pos][col+1])%k] = new Rec(row[col][i].start, row[col][i].path+'R', row[col][i].score+(i+board[pos][col+1])/k);
            }
            row = rowNew;
            rowNew = new Rec[m][k];
        }
        
        int best = -1, start = 0; String path = null;
        for (int i=0; i<m; i++) if (row[i][0]!=null) if (row[i][0].score>best){
            best=row[i][0].score;
            start=row[i][0].start;
            path=row[i][0].path;
        }
        
        if (best!=-1) {
            println(best*k);
            println(start+1);
            println(path);
        } else println(-1);

    }

    ////////////////////////////////////////////////////////////////////////////

    boolean showDebug = true;

    double EPS = 1e-7;
    int INF = Integer.MAX_VALUE;
    long INFL = Long.MAX_VALUE;
    double INFD = Double.MAX_VALUE;


    int absPos(int i) {
        return i<0 ? 0:i;
    }
    long absPos(long i) {
        return i<0 ? 0:i;
    }
    double absPos(double i) {
        return i<0 ? 0:i;
    }

    int min(int... nums) {
        int r = INF;
        for (int i: nums)
            if (i<r) r=i;
        return r;
    }
    int max(int... nums) {
        int r = -INF;
        for (int i: nums)
            if (i>r) r=i;
        return r;
    }
    long minL(long... nums) {
        long r = INFL;
        for (long i: nums)
            if (i<r) r=i;
        return r;
    }
    long maxL(long... nums) {
        long r = -INFL;
        for (long i: nums)
            if (i>r) r=i;
        return r;
    }
    double minD(double... nums) {
        double r = INFD;
        for (double i: nums)
            if (i<r) r=i;
        return r;
    }
    double maxD(double... nums) {
        double r = -INFD;
        for (double i: nums)
            if (i>r) r=i;
        return r;
    }
    long sumArr(int[] arr) {
        long res = 0;
        for (int i: arr)
            res+=i;
        return res;
    }
    long sumArr(long[] arr) {
        long res = 0;
        for (long i: arr)
            res+=i;
        return res;
    }
    double sumArr(double[] arr) {
        double res = 0;
        for (double i: arr)
            res+=i;
        return res;
    }

    long partsFitCnt(long partSize, long wholeSize) {
        return (partSize+wholeSize-1)/partSize;
    }

    boolean odd(long i) {
        return (i&1)==1;
    }

    long binpow(int x, int n) {
        long r = 1;
        while (n>0) {
            if ((n&1)!=0) r*=x;
            x*=x;
            n>>=1;
        }
        return r;
    }


    String str(Object o) {
        return o.toString();
    }


    long timer = System.currentTimeMillis();
    void startTimer() {
        timer = System.currentTimeMillis();
    }
    void stopTimer() {
        System.err.println("time: "+(System.currentTimeMillis()-timer)/1000.0);
    }


    class InputReader {
        byte[] buf = new byte[1<<16];
        int bufPos = 0, bufLim = -1;
        char read() throws IOException {
            if (bufPos>=bufLim) {
                bufLim = System.in.read(buf);
                bufPos = 0;
            }
            return (char)buf[bufPos++];
        }
    }

    InputReader in = new InputReader();
    static BufferedWriter out = new BufferedWriter(new OutputStreamWriter(System.out), 1<<16);

    char next() throws IOException {
        return in.read();
    }
    char nextChar() throws IOException {
        char c = in.read();
        while (c<=' ') c=in.read();
        return c;
    }
    String nextWord() throws IOException {
        StringBuilder sb = new StringBuilder();
        char c = in.read();
        while (c<=' ') c=in.read();
        while (c>' ') {
            sb.append(c);
            c = in.read();
        }
        return new String(sb);
    }
    String nextLine() throws IOException {
        StringBuilder sb = new StringBuilder();
        char c = in.read();
        while (c<=' ') c=in.read();
        while (c!='\n' && c!='\r') {
            sb.append(c);
            c = in.read();
        }
        return new String(sb);
    }
    int nextInt() throws NumberFormatException, IOException {
        return Integer.parseInt(nextWord());
    }
    long nextLong() throws NumberFormatException, IOException {
        return Long.parseLong(nextWord());
    }
    double nextDouble() throws NumberFormatException, IOException {
        return Double.parseDouble(nextWord());
    }
    int[] nextArr(int size) throws NumberFormatException, IOException {
        int[] arr = new int[size];
        for (int i=0; i<size; i++)
            arr[i] = nextInt();
        return arr;
    }
    long[] nextArrL(int size) throws NumberFormatException, IOException {
        long[] arr = new long[size];
        for (int i=0; i<size; i++)
            arr[i] = nextLong();
        return arr;
    }
    double[] nextArrD(int size) throws NumberFormatException, IOException {
        double[] arr = new double[size];
        for (int i=0; i<size; i++)
            arr[i] = nextDouble();
        return arr;
    }
    String[] nextArrS(int size) throws NumberFormatException, IOException {
        String[] arr = new String[size];
        for (int i=0; i<size; i++)
            arr[i] = nextWord();
        return arr;
    }
    char[] nextArrCh(int size) throws IOException {
        char[] arr = new char[size];
        for (int i=0; i<size; i++)
            arr[i] = nextChar();
        return arr;
    }
    char[][] nextArrCh(int rows, int columns) throws IOException {
        char[][] arr = new char[rows][columns];
        for (int i=0; i<rows; i++)
            for (int j=0; j<columns; j++)
                arr[i][j] = nextChar();
        return arr;
    }

    void print(Object o) throws IOException {
        out.write(o.toString());
    }
    void println(Object o) throws IOException {
        out.write(o.toString());
        out.newLine();
    }
    void print(Object... o) throws IOException {
        for (int i=0; i<o.length; i++) {
            if (i!=0) out.write(' ');
            out.write(o[i].toString());
        }
    }
    void println(Object... o) throws IOException {
        print(o);
        out.newLine();
    }
    void printn(Object o, int n) throws IOException {
        String s = o.toString();
        for (int i=0; i<n; i++) {
            out.write(s);
            if (i!=n-1) out.write(' ');
        }
    }
    void printnln(Object o, int n) throws IOException {
        printn(o, n);
        out.newLine();
    }
    void printArr(int[] arr) throws IOException {
        for (int i=0; i<arr.length; i++) {
            if (i!=0) out.write(' ');
            out.write(Integer.toString(arr[i]));
        }
    }
    void printArr(long[] arr) throws IOException {
        for (int i=0; i<arr.length; i++) {
            if (i!=0) out.write(' ');
            out.write(Long.toString(arr[i]));
        }
    }
    void printArr(double[] arr) throws IOException {
        for (int i=0; i<arr.length; i++) {
            if (i!=0) out.write(' ');
            out.write(Double.toString(arr[i]));
        }
    }
    void printArr(String[] arr) throws IOException {
        for (int i=0; i<arr.length; i++) {
            if (i!=0) out.write(' ');
            out.write(arr[i]);
        }
    }
    void printArr(char[] arr) throws IOException {
        for (char c: arr) out.write(c);
    }
    void printlnArr(int[] arr) throws IOException {
        printArr(arr);
        out.newLine();
    }
    void printlnArr(long[] arr) throws IOException {
        printArr(arr);
        out.newLine();
    }
    void printlnArr(double[] arr) throws IOException {
        printArr(arr);
        out.newLine();
    }
    void printlnArr(String[] arr) throws IOException {
        printArr(arr);
        out.newLine();
    }
    void printlnArr(char[] arr) throws IOException {
        printArr(arr);
        out.newLine();
    }

    void debug(Object... o) {
        if (showDebug) System.err.println(Arrays.deepToString(o));
    }


    public static void main(String[] args) throws Exception {
        Locale.setDefault(Locale.US);
        new _40_d2_D().solve();
        out.flush(); out.close();
    }
}
