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 int N = 1e6 + 11;
int a[8][8];
vector<pair<int, int> > v;
void add(int x, int t) {
  if (t == 1) {
    for (int j = 0; j <= 6; j++) a[x][j] = a[x][j + 1];
    a[x][6] = a[x][0];
  }
  if (t == 2) {
    for (int j = 7; j >= 1; j--) a[x][j] = a[x][j - 1];
    a[x][1] = a[x][7];
  }
  if (t == 3) {
    for (int i = 0; i <= 6; i++) a[i][x] = a[i + 1][x];
    a[6][x] = a[0][x];
  }
  if (t == 4) {
    for (int i = 7; i >= 1; i--) a[i][x] = a[i - 1][x];
    a[1][x] = a[7][x];
  }
  v.push_back(make_pair(t, x));
}
void swap1(int i, int j) {
  add(j + 1, 4);
  add(i, 2);
  add(j + 1, 4);
  add(i, 1);
  add(j + 1, 4);
  add(i, 2);
  add(j + 1, 4);
  add(i, 1);
  add(j + 1, 4);
  add(i, 2);
  add(j + 1, 4);
  add(i, 1);
  add(j + 1, 4);
}
void swap2(int i, int j) {
  add(i + 1, 2);
  add(j, 4);
  add(i + 1, 2);
  add(j, 3);
  add(i + 1, 2);
  add(j, 4);
  add(i + 1, 2);
  add(j, 3);
  add(i + 1, 2);
  add(j, 4);
  add(i + 1, 2);
  add(j, 3);
  add(i + 1, 2);
}
void writee() {
  cout << endl;
  for (int i = 1; i <= 6; i++) {
    for (int j = 1; j <= 6; j++) cout << a[i][j] << " ";
    cout << endl;
  }
  cout << endl;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  for (int i = 1; i <= 6; i++)
    for (int j = 1; j <= 6; j++) {
      char c;
      cin >> c;
      if (c >= '0' && c <= '9')
        a[i][j] = c - '0' + 1;
      else
        a[i][j] = c - 'A' + 11;
    }
  int x = 0;
  for (int i = 1; i <= 6; i++)
    for (int j = 1; j <= 6; j++) {
      x++;
      int l, r;
      for (int i = 1; i <= 6; i++)
        for (int j = 1; j <= 6; j++)
          if (a[i][j] == x) {
            l = i;
            r = j;
          }
      while (r > j) {
        swap1(l, r - 1);
        r--;
      }
      while (r < j) {
        swap1(l, r);
        r++;
      }
      while (l > i) {
        swap2(l - 1, r);
        l--;
      }
    }
  cout << v.size() << "\n";
  for (int i = 0; i < v.size(); i++) {
    if (v[i].first == 1) cout << "L";
    if (v[i].first == 2) cout << "R";
    if (v[i].first == 3) cout << "U";
    if (v[i].first == 4) cout << "D";
    cout << v[i].second << "\n";
  }
}