Problem: There is a square box 6 × 6 in size. It contains 36 chips 1 × 1 in size. Those chips contain 36 different characters — "0"-"9" and "A"-"Z". There is exactly one chip with each character.

You are allowed to make the following operations: you may choose one of 6 rows or one of 6 columns and cyclically shift the chips there to one position to the left or to the right (for the row) or upwards or downwards (for the column). Those operations are allowed to perform several times. 

To solve the puzzle is to shift the chips using the above described operations so that they were written in the increasing order (exactly equal to the right picture). An example of solving the puzzle is shown on a picture below.

<image>

Write a program that finds the sequence of operations that solves the puzzle. That sequence should not necessarily be shortest, but you should not exceed the limit of 10000 operations. It is guaranteed that the solution always exists.

Input

The input data are represented by 6 lines containing 6 characters each. They are the puzzle's initial position. Those lines contain each character from the string "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" exactly once.

Output

On the first line print number n, which is the number of operations. On the next n lines print the sequence of operations one per line. An operation is described by a word consisting of two characters. The first character shows the direction where the row or the column will be shifted. The possible directions are "L", "R" (to the left, to the right correspondingly, we shift a row), "U", "D" (upwards, downwards correspondingly, we shift a column). The second character is the number of the row (or the column), it is an integer from "1" to "6". The rows are numbered from the top to the bottom, the columns are numbered from the left to the right.

The number of operations should not exceed 104. If there are several solutions, print any of them.

Examples

Input

01W345
729AB6
CD8FGH
IJELMN
OPKRST
UVQXYZ


Output

2
R2
U3

Solution (in JAVA):

Solution:
import java.util.InputMismatchException;
import java.io.*;
import java.util.*;

/**
 * Generated by Contest helper plug-in
 * Actual solution is at the bottom
 */
public class Main {
    public static void main(String[] args) {
        InputReader in = new StreamInputReader(System.in);
        PrintWriter out = new PrintWriter(System.out);
        run(in, out);
    }

    public static void run(InputReader in, PrintWriter out) {
        Solver solver = new Move();
        solver.solve(1, in, out);
        Exit.exit(in, out);
    }
}

class StreamInputReader extends InputReader {
    private InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar, numChars;

    public StreamInputReader(InputStream stream) {
        this.stream = stream;
        curChar = 0;
    }

    public int read() {
        if (numChars == -1)
            throw new InputMismatchException();
        if (curChar >= numChars) {
            curChar = 0;
            try {
                numChars = stream.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (numChars <= 0)
                return -1;
        }
        return buf[curChar++];
    }

    @Override
    public void close() {
        try {
            stream.close();
        } catch (IOException ignored) {
        }
    }
}

abstract class InputReader {
    private boolean finished = false;

    public abstract int read();


    public String nextToken() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        StringBuffer res = new StringBuffer();
        do {
            res.appendCodePoint(c);
            c = read();
        } while (!isSpaceChar(c));
        return res.toString();
    }
    private boolean isSpaceChar(int c) {
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

    public void setFinished(boolean finished) {
        this.finished = finished;
    }

    public abstract void close();
}

interface Solver {
    public void solve(int testNumber, InputReader in, PrintWriter out);
}

class Exit {
    private Exit() {
    }

    public static void exit(InputReader in, PrintWriter out) {
        in.setFinished(true);
        in.close();
        out.close();
    }
}

class Move implements Solver {


    Vector<String> ans ;

    void print(int i0, int j0, int i1, int j1) {
        if (i0 == i1) {
            int mn = Math.min(j0, j1);
            String p[] = H.split(" ");
            for (int j = 0; j < p.length; ++j) {
                if (p[j].equals("D")) {
                    ans.add("D"+(mn+1));
                } else {
                    ans.add(p[j]+(i0+1));
                }
            }
        } else {
            int mx = Math.max(i0, i1);
            String p[] = V.split(" ");
            for (int j = 0; j < p.length; ++j) {
                if (p[j].equals("R")) {
                    ans.add("R"+(mx+1));
                } else {
                    ans.add(p[j]+(j0+1));
                }
            }
        }
    }
    static final String H = "D L D R D L D R D L D R D";
    static final String V = "R D R U R D R U R D R U R";
    public void solve(int testNumber, InputReader in, PrintWriter out) {

        String H = "D L D R D L D R D L D R D";//swap, (i, j) -> (i, j + 1)/

        //
        //                                       // Uj Li Ri
        String V = "R D R U R D R U R D R U R"; // swap (i, j) (i + 1, j)
                                                // R(i+1), Down up -> j

        ans = new Vector<String> () ;
        //build();
        char s[] = new char[36];
        for (int i = 0; i <= 9; ++i) {
            s[i] = (char)(i + '0');
        }
        for (int i = 0; i < 26; ++i) {
            s[i + 10] = (char)(i + 'A');
        }
        char tmp[][] = new char[6][6];
        int p = 0;
        for (int i = 0; i < s.length; ++i) {
            tmp[p / 6][p % 6] = s[i];
            p ++ ;
        }
        State start = new State(tmp);

        char r[][] = new char[6][];
        for (int i =0 ; i < 6; ++i)
            r[i] = in.nextToken().toCharArray();
        State cur = new State(r);


        HashMap<Character, P> pointer = new HashMap<Character, P> ();
        for (int i = 0; i < 6; ++i)
            for (int j = 0; j < 6; ++j)
                pointer.put(cur.s[i][j], new P(j, i));

        while (!start.equals(cur)) {
            for (int i = 0; i < 6; ++i)
                for (int j = 0; j < 6; ++j) {
                    if (start.s[i][j] != cur.s[i][j])  {
                        while (start.s[i][j] != cur.s[i][j]) {
                            P tt = pointer.get(start.s[i][j]);
                            int pi = tt.y;
                            int pj = tt.x;
                            int dj = (j - pj == 0 ? 0 : (j - pj) / Math.abs(j - pj));
                            int di = (i - pi == 0 ? 0 : (i - pi) / Math.abs(i - pi));
                            int npi = -1, npj = -1;
                            if (di != 0) {
                                npi = pi + di;
                                npj = pj ;
                            } else if (dj != 0) {
                                npi = pi;
                                npj = pj + dj;
                            } else throw new RuntimeException();
                            print(npi, npj, pi, pj);
                            char ch = cur.s[npi][npj];
                            cur.s[npi][npj] = cur.s[pi][pj];
                            cur.s[pi][pj] = ch;
                            pointer.put(cur.s[npi][npj], new P(npj, npi));
                            pointer.put(cur.s[pi][pj], new P(pj, pi));
                        }
                    }
                }
        }

        cur = new State(r);
        out.print(ans.size() + "\n");
        for (String str : ans) {
            out.println(str);
        /*    char ch = str.charAt(0);
            int dig = str.charAt(1) - '1';
            if (ch == 'D') cur = cur.rotateDown(dig);
            else if (ch == 'U') cur = cur.rotateUp(dig);
            else if (ch == 'R') cur = cur.rotateRight(dig);
            else if (ch == 'L') cur = cur.rotateLeft(dig);*/
        }
      //  out.print("res : \n");
      //  out.print(cur);

    }
    class P {
        int x, y;

        P(int x, int y) {
            this.x = x;
            this.y = y;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (!(o instanceof P)) return false;

            P p = (P) o;

            if (x != p.x) return false;
            if (y != p.y) return false;

            return true;
        }

        @Override
        public int hashCode() {
            int result = x;
            result = 31 * result + y;
            return result;
        }
    }



    class State {
        char s[][] ;


        State(char[][] s) {
            this.s = new char[s.length][];
            for (int i = 0; i < s.length; ++i)
                this.s[i] = s[i].clone();
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) return true;

            State tmp = (State) o;
            for (int i =0 ; i < 6; ++i)
                for (int j =0 ; j < 6; ++j)
                    if (this.s[i][j] != tmp.s[i][j]) return false;
            return true;
        }

        @Override
        public int hashCode() {
            int r = 1;
            for (int i = 0; i < 6; ++i)
                for (int j = 0; j < 6; ++j)
                    r = 31 * r + (s[i][j] - '0' + 1);
            return r;
        }

        @Override
        public String toString() {
            String tmp = "";
            for (int i =0 ; i < 6; ++i) {
                tmp += Arrays.toString(this.s[i]) + "\n";
            }
            return tmp;
        }
    }
}