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;
const double pi = 3.1415926535897932384626433832795;
const double eps = 1e-8;
char ch[1 << 20];
string gs() {
  scanf("%s", ch);
  return string(ch);
}
string gl() {
  gets(ch);
  return string(ch);
}
template <class T>
T gcd(T a, T b) {
  return (!a) ? b : gcd(b % a, a);
}
void error() {
  int yyy = 0;
  cout << 7 / yyy;
}
vector<string> AA;
vector<string> RES;
inline string ss(char a, char b) {
  string s;
  s += a;
  s += b;
  return s;
}
void iL(int i) {
  RES.push_back(ss('L', '1' + i));
  char x = AA[i][0];
  for (int j = (0), _b(5); j < _b; ++j) AA[i][j] = AA[i][j + 1];
  AA[i][5] = x;
}
void iR(int i) {
  RES.push_back(ss('R', '1' + i));
  char x = AA[i][5];
  for (int j = (6) - 1, _b(1); j >= _b; --j) AA[i][j] = AA[i][j - 1];
  AA[i][0] = x;
}
void iU(int i) {
  RES.push_back(ss('U', '1' + i));
  char x = AA[0][i];
  for (int j = (0), _b(5); j < _b; ++j) AA[j][i] = AA[j + 1][i];
  AA[5][i] = x;
}
void iD(int i) {
  RES.push_back(ss('D', '1' + i));
  char x = AA[5][i];
  for (int j = (6) - 1, _b(1); j >= _b; --j) AA[j][i] = AA[j - 1][i];
  AA[0][i] = x;
}
void iright(int x, int y) {
  iR(x);
  iU(y);
  iR(x);
  iD(y);
  iR(x);
  iU(y);
  iR(x);
  iD(y);
  iR(x);
  iU(y);
  iR(x);
  iR(x);
  iD(y);
}
void ileft(int x, int y) {
  iL(x);
  iU(y);
  iL(x);
  iD(y);
  iL(x);
  iU(y);
  iL(x);
  iD(y);
  iL(x);
  iU(y);
  iL(x);
  iL(x);
  iD(y);
}
void idown(int x, int y) {
  iD(y);
  iR(x);
  iD(y);
  iL(x);
  iD(y);
  iR(x);
  iD(y);
  iL(x);
  iD(y);
  iR(x);
  iD(y);
  iD(y);
  iL(x);
}
void iup(int x, int y) {
  iU(y);
  iR(x);
  iU(y);
  iL(x);
  iU(y);
  iR(x);
  iU(y);
  iL(x);
  iU(y);
  iR(x);
  iU(y);
  iU(y);
  iL(x);
}
int PLAACED[6][6];
int dx[4] = {-1, 1, 0, 0};
int dy[4] = {0, 0, -1, 1};
void bfs(int fromx, int fromy, int tox, int toy) {
  int D[6][6];
  int Q[128];
  memset(D, -1, sizeof(D));
  Q[0] = tox << 10 | toy;
  D[tox][toy] = 0;
  int qw = 1;
  for (int q = 0; q < qw; ++q) {
    int x = Q[q] >> 10;
    int y = Q[q] & 1023;
    for (int k = (0), _b(4); k < _b; ++k) {
      int xx = dx[k] + x;
      int yy = dy[k] + y;
      if (xx < 0 || yy < 0 || xx >= 6 || yy >= 6 || PLAACED[xx][yy] ||
          D[xx][yy] != -1)
        continue;
      D[xx][yy] = D[x][y] + 1;
      Q[qw++] = xx << 10 | yy;
    }
  }
  int x = fromx;
  int y = fromy;
  while (x != tox || y != toy) {
    for (int k = (0), _b(4); k < _b; ++k) {
      int xx = x + dx[k];
      int yy = y + dy[k];
      if (xx < 0 || yy < 0 || xx >= 6 || yy > 6 || PLAACED[xx][yy] ||
          D[x][y] - 1 != D[xx][yy])
        continue;
      if (k == 0) iup(x, y);
      if (k == 1) idown(x, y);
      if (k == 2) ileft(x, y);
      if (k == 3) iright(x, y);
      x = xx;
      y = yy;
      break;
    }
  }
  PLAACED[tox][toy] = 1;
}
int main(int argn, char **argv) {
  vector<string> B;
  B.push_back("012345");
  B.push_back("6789AB");
  B.push_back("CDEFGH");
  B.push_back("IJKLMN");
  B.push_back("OPQRST");
  B.push_back("UVWXYZ");
  for (int i = (0), _b(6); i < _b; ++i) {
    string s;
    cin >> s;
    AA.push_back(s);
  }
  map<char, int> X, Y;
  for (int i = (0), _b(6); i < _b; ++i)
    for (int j = (0), _b(6); j < _b; ++j) X[B[i][j]] = i, Y[B[i][j]] = j;
  memset(PLAACED, 0, sizeof(PLAACED));
  for (int i = (0), _b(6); i < _b; ++i)
    for (int j = (0), _b(6); j < _b; ++j) {
      int xx, yy;
      for (int x = (0), _b(6); x < _b; ++x) {
        for (int y = (0), _b(6); y < _b; ++y)
          if (B[i][j] == AA[x][y]) xx = x, yy = y;
      }
      bfs(xx, yy, i, j);
      xx = xx;
    }
  printf("%d\n", RES.size());
  for (int i = (0), _b(RES.size()); i < _b; ++i) printf("%s\n", RES[i].c_str());
  return 0;
}