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;
int n, w;
char s[10][10], r[10][10], out[10005][5];
void up(int x) {
  sprintf(out[w++], "U%d", x + 1);
  r[n][x] = r[0][x];
  for (int i = 0; i < n; i++) r[i][x] = r[i + 1][x];
}
void down(int x) {
  sprintf(out[w++], "D%d", x + 1);
  for (int i = n; i > 0; i--) r[i][x] = r[i - 1][x];
  r[0][x] = r[n][x];
}
void left(int x) {
  sprintf(out[w++], "L%d", x + 1);
  r[x][n] = r[x][0];
  for (int i = 0; i < n; i++) r[x][i] = r[x][i + 1];
}
void right(int x) {
  sprintf(out[w++], "R%d", x + 1);
  for (int i = n; i > 0; i--) r[x][i] = r[x][i - 1];
  r[x][0] = r[x][n];
}
void swapLR(int x, int y) {
  for (int i = 0; i < n; i++) {
    right(x);
    if (i == n - 1) right(x);
    if (i & 1)
      up(y);
    else
      down(y);
  }
}
void swapUD(int x, int y) {
  for (int i = 0; i < n; i++) {
    down(y);
    if (i == n - 1) down(y);
    if (i & 1)
      left(x);
    else
      right(x);
  }
}
int main() {
  n = 6;
  strcpy(s[0], "012345");
  strcpy(s[1], "6789AB");
  strcpy(s[2], "CDEFGH");
  strcpy(s[3], "IJKLMN");
  strcpy(s[4], "OPQRST");
  strcpy(s[5], "UVWXYZ");
  for (int i = 0; i < n; i++) scanf("%s", r[i]);
  w = 0;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      for (int k = 0; k < n; k++) {
        for (int l = 0; l < n; l++) {
          if (r[k][l] == s[i][j]) {
            if (l >= j) {
              for (int o = l - 1; o >= j; o--) {
                swapLR(k, o);
              }
            } else {
              for (int o = l; o < j; o++) {
                swapLR(k, o);
              }
            }
            for (int o = k - 1; o >= i; o--) {
              swapUD(o, j);
            }
            break;
          }
        }
      }
    }
  }
  printf("%d\n", w);
  for (int i = 0; i < w; i++) printf("%s\n", out[i]);
  return 0;
}