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 CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
char puzzle[6][6];
struct Pos {
  int r, c;
};
string alpha = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
char pieceForPos(int r, int c) { return alpha[r * 6 + c]; }
Pos posOfPiece(char ch) {
  for (int r = 0; r < 6; r++)
    for (int c = 0; c < 6; c++)
      if (puzzle[r][c] == ch) {
        return {r, c};
      }
}
struct OP {
  bool ver;
  int loc, tms;
  string repr() {
    char type = ver ? (tms > 0 ? 'D' : 'U') : (tms > 0 ? 'R' : 'L');
    string ret;
    ret.resize(2);
    ret[0] = type;
    ret[1] = loc + '0' + 1;
    return ret;
  }
};
vector<OP> ops;
void cyclicRotate(Pos pos1, Pos pos3) {
  assert(pos3.r != pos1.r && pos1.c != pos3.c);
  assert(pos1.r >= 0 && pos1.r < 6);
  assert(pos1.c >= 0 && pos1.c < 6);
  assert(pos3.r >= 0 && pos3.r < 6);
  assert(pos3.c >= 0 && pos3.c < 6);
  Pos pos2 = {pos3.r, pos1.c};
  ops.push_back({true, pos1.c, pos2.r - pos1.r});
  ops.push_back({false, pos2.r, pos2.c - pos3.c});
  ops.push_back({true, pos1.c, pos1.r - pos2.r});
  ops.push_back({false, pos2.r, pos3.c - pos2.c});
  swap(puzzle[pos3.r][pos3.c], puzzle[pos2.r][pos2.c]);
  swap(puzzle[pos2.r][pos2.c], puzzle[pos1.r][pos1.c]);
}
void swapAdjLast() {
  ops.push_back({false, 5, 1});
  ops.push_back({true, 5, 2});
  ops.push_back({false, 5, -1});
  ops.push_back({true, 5, 1});
  ops.push_back({false, 5, 1});
  ops.push_back({true, 5, 1});
  ops.push_back({false, 5, -1});
  ops.push_back({true, 5, 1});
  ops.push_back({false, 5, 1});
  ops.push_back({true, 5, 1});
  ops.push_back({false, 5, -1});
  ops.push_back({true, 5, 1});
  swap(puzzle[4][5], puzzle[5][4]);
}
int main() {
  for (int r = 0; r < 6; r++)
    for (int c = 0; c < 6; c++) {
      cin >> puzzle[r][c];
    }
  for (int r = 0; r < 5; r++)
    for (int c = 0; (r < 4 && c < 6) || (r == 4 && c < 5); c++) {
      char piece = pieceForPos(r, c);
      if (puzzle[r][c] != piece) {
        Pos pos = posOfPiece(piece);
        if (pos.r == r) {
          cyclicRotate(pos, {pos.r + 1, pos.c - 1});
          pos.r++;
        }
        if (pos.c == c) {
          if (c < 5) {
            cyclicRotate({r, c}, {pos.r, pos.c + 1});
            pos.c++;
          } else {
            cyclicRotate({r, c}, {pos.r, pos.c - 1});
            pos.c--;
          }
        }
        cyclicRotate({r, c}, pos);
      }
      if (r == 4) {
        char piece = pieceForPos(5, c);
        if (puzzle[5][c] != piece) {
          Pos pos = posOfPiece(piece);
          if (pos.r == 5) {
            cyclicRotate({4, pos.c}, {5, c});
          } else {
            cyclicRotate(pos, {5, c});
            cyclicRotate(pos, {5, c});
          }
        }
      }
    }
  if (puzzle[4][5] != pieceForPos(4, 5)) {
    swapAdjLast();
  }
  vector<string> lines;
  for (OP op : ops) {
    string repr = op.repr();
    for (int i = 0; i < abs(op.tms); i++) {
      lines.push_back(repr);
    }
  }
  cout << lines.size() << "\n";
  for (string& line : lines) {
    cout << line << "\n";
  }
}