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;
vector<pair<char, int> > ans;
int tr[300], a[7][7];
char ch[10];
void swapy(int x, int y1, int y2) {
  if (y1 == y2) return;
  if (y1 > y2) swap(y1, y2);
  int d = y2 - y1;
  for (int t = 1; t <= 5; ++t) {
    ans.push_back(make_pair('U', y2));
    for (int i = 0; i < d; ++i) ans.push_back(make_pair('R', x));
    ans.push_back(make_pair('D', y2));
    for (int i = 0; i < d; ++i) ans.push_back(make_pair('L', x));
    ans.push_back(make_pair('U', y2));
  }
}
void swapx(int x, int y1, int y2) {
  if (y1 == y2) return;
  if (y1 > y2) swap(y1, y2);
  int d = y2 - y1;
  for (int t = 1; t <= 5; ++t) {
    ans.push_back(make_pair('L', y2));
    for (int i = 0; i < d; ++i) ans.push_back(make_pair('D', x));
    ans.push_back(make_pair('R', y2));
    for (int i = 0; i < d; ++i) ans.push_back(make_pair('U', x));
    ans.push_back(make_pair('L', y2));
  }
}
void iswap(int x1, int y1, int x2, int y2) {
  swap(a[x1][y1], a[x2][y2]);
  swapy(x1, y1, y2);
  if (x1 != x2) {
    swapx(y2, x1, x2);
    swapy(x1, y1, y2);
  }
}
bool v[7][7];
void dfs(int x, int y) {
  if (v[x][y]) return;
  v[x][y] = 1;
  dfs(a[x][y] / 6, a[x][y] % 6);
  iswap(x, y, a[x][y] / 6, a[x][y] % 6);
}
int main() {
  for (int i = 0; i <= 9; ++i) tr[i + '0'] = i;
  for (int i = 0; i < 26; ++i) tr[i + 'A'] = i + 10;
  for (int i = 0; i < 6; ++i) {
    scanf("%s", ch);
    for (int j = 0; j < 6; ++j) a[i][j] = tr[ch[j]];
  }
  for (int i = 0; i < 6; ++i)
    for (int j = 0; j < 6; ++j) dfs(i, j);
  printf("%d\n", (int)ans.size());
  for (int i = 0; i < (int)ans.size(); ++i)
    printf("%c%d\n", ans[i].first, ans[i].second + 1);
  return 0;
}