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>
char s[7][7];
int map[7][7];
int top, dir[10000], num[10000], step[10000], x, y;
void out() {
  int i, j;
  for (i = 1; i <= 6; printf("\n"), i++)
    for (j = 1; j <= 6; j++) printf("%3d ", map[i][j]);
}
void find(int a) {
  for (x = 1; x <= 6; x++)
    for (y = 1; y <= 6; y++)
      if (map[x][y] == a) return;
}
void move(int d, int n, int s) {
  int i;
  step[top] = s;
  num[top] = n;
  dir[top] = d;
  top++;
  int tmp[7];
  if (d == 1 || d == 2) s *= -1;
  if (d < 2) {
    for (i = 1; i <= 6; i++) tmp[i] = map[n][i];
    for (i = 1; i <= 6; i++) map[n][(i - 1 + s + 6) % 6 + 1] = tmp[i];
  } else {
    for (i = 1; i <= 6; i++) tmp[i] = map[i][n];
    for (i = 1; i <= 6; i++) map[(i - 1 + s + 6) % 6 + 1][n] = tmp[i];
  }
}
void SWAP(int p) {
  move(0, 6, 1);
  move(3, p + 1, 1);
  move(1, 6, 1);
  move(2, p + 1, 1);
  move(1, 6, 1);
  move(3, p, 1);
  move(0, 6, 1);
  move(2, p, 1);
  move(0, 6, 1);
  move(3, p + 1, 1);
  move(1, 6, 1);
  move(2, p + 1, 1);
}
void make_cir(int p) {
  SWAP(p);
  move(1, 6, 1);
  SWAP(p);
  move(0, 6, 1);
}
int main() {
  int i, j, a, b;
  top = 0;
  for (i = 1; i <= 6; i++) {
    scanf("%s", &s[i][1]);
    for (j = 1; j <= 6; j++)
      map[i][j] = s[i][j] <= '9' ? s[i][j] - '0' : s[i][j] - 'A' + 10;
  }
  for (i = 0; i <= 29; i++) {
    find(i);
    a = i / 6 + 1, b = i % 6 + 1;
    if (x == a && y == b) continue;
    if (i <= 5) {
      if (i == 0)
        move(1, x, y - 1), move(2, 1, x - 1);
      else {
        if (x == 1) move(3, y, 1), x = 2;
        if (y > b)
          move(1, x, y - b);
        else if (y < b)
          move(0, x, b - y);
        move(2, b, x - 1);
      }
    } else {
      if (y == b) {
        move(0, x, 1), y = y % 6 + 1;
      }
      if (x == a) {
        move(3, y, 1);
        move(3, b, 1);
        if (y > b)
          move(1, a + 1, y - b);
        else if (y < b)
          move(0, a + 1, y - b);
        move(2, y, 1);
        move(2, b, 1);
      } else {
        move(3, b, x - a);
        if (y > b)
          move(1, x, y - b);
        else if (y < b)
          move(0, x, b - y);
        move(2, b, x - a);
      }
    }
  }
  while (1) {
    for (i = 30; i <= 33; i++) {
      find(i);
      b = i % 6 + 1;
      while (y != b) {
        if (y - 1 <= 4)
          make_cir(y - 1);
        else
          make_cir(y - 2);
        find(i);
      }
    }
    if (map[6][6] == 35) break;
    move(0, 6, 1);
  }
  int sum = 0;
  for (i = 0; i < top; i++) sum += step[i];
  printf("%d\n", sum);
  for (i = 0; i < top; i++) {
    while (step[i]--) {
      if (dir[i] == 0)
        printf("R");
      else if (dir[i] == 1)
        printf("L");
      else if (dir[i] == 2)
        printf("U");
      else
        printf("D");
      printf("%d\n", num[i]);
    }
  }
}