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 dic[50] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
char a[10][10];
char ans[10000][5];
int la;
void U(int y) {
  ans[++la][0] = 'U', ans[la][1] = y + '0';
  char t = a[1][y];
  for (int i = (1); i <= (5); ++i) a[i][y] = a[i + 1][y];
  a[6][y] = t;
}
void D(int y) {
  ans[++la][0] = 'D', ans[la][1] = y + '0';
  char t = a[6][y];
  for (int i = (6); i >= (2); --i) a[i][y] = a[i - 1][y];
  a[1][y] = t;
}
void L(int x) {
  ans[++la][0] = 'L', ans[la][1] = x + '0';
  char t = a[x][1];
  for (int i = (1); i <= (5); ++i) a[x][i] = a[x][i + 1];
  a[x][6] = t;
}
void R(int x) {
  ans[++la][0] = 'R', ans[la][1] = x + '0';
  char t = a[x][6];
  for (int i = (6); i >= (2); --i) a[x][i] = a[x][i - 1];
  a[x][1] = t;
}
void work1(int x, int y) {
  for (int i = 1; i <= (5); ++i) {
    D(y);
    L(x);
    U(y);
    R(x);
    D(y);
  }
}
void work2(int x, int y) {
  for (int i = 1; i <= (5); ++i) {
    R(x);
    U(y);
    L(x);
    D(y);
    R(x);
  }
}
int main() {
  for (int i = 1; i <= (6); ++i) scanf("%s", a[i] + 1);
  for (int i = 1; i <= (6); ++i)
    for (int j = 1; j <= (5); ++j) {
      int x, y;
      for (int p = 1; p <= (6); ++p)
        for (int q = 1; q <= (6); ++q)
          if (a[p][q] == dic[i * 6 + j - 7]) x = p, y = q;
      if (x != i) {
        while (y < 6) {
          R(x);
          ++y;
        }
        while (x > i) {
          U(6);
          --x;
        }
        while (x < i) {
          D(6);
          ++x;
        }
      }
      while (y > j) {
        if (j == 1)
          L(x);
        else
          work1(x, y - 1);
        --y;
      }
    }
  for (int i = 1; i <= (6); ++i) {
    int x(1);
    for (; a[x][6] != dic[i * 6 - 1]; ++x)
      ;
    while (x > i) {
      if (i == 1)
        U(6);
      else
        work2(x - 1, 6);
      --x;
    }
  }
  printf("%d\n", la);
  for (int i = 1; i <= (la); ++i) puts(ans[i]);
  return 0;
}