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<string> movl(vector<string> a, int x) {
  rotate(a[x].begin(), a[x].begin() + 1, a[x].end());
  return a;
}
vector<string> movr(vector<string> a, int x) {
  rotate(a[x].begin(), a[x].begin() + 5, a[x].end());
  return a;
}
vector<string> movu(vector<string> a, int x) {
  char t = a[0][x];
  for (int i = 0; i < 5; i++) a[i][x] = a[i + 1][x];
  a[5][x] = t;
  return a;
}
vector<string> movd(vector<string> a, int x) {
  char t = a[5][x];
  for (int i = 4; i >= 0; i--) a[i + 1][x] = a[i][x];
  a[0][x] = t;
  return a;
}
vector<string> ident() {
  return {"012345", "6789AB", "CDEFGH", "IJKLMN", "OPQRST", "UVWXYZ"};
}
vector<string> run(vector<string> a, string s) {
  for (int i = 0; i < (int)s.size(); i += 2) {
    int x = s[i + 1] - '1';
    if (s[i] == 'U') a = movu(a, x);
    if (s[i] == 'D') a = movd(a, x);
    if (s[i] == 'L') a = movl(a, x);
    if (s[i] == 'R') a = movr(a, x);
  }
  return a;
}
string basicswap = "D1L1U1R1D1D1L1U1R1D1D1L1U1R1D1D1L1U1R1D1D1L1U1R1D1";
string transpose(string s) {
  for (int i = 0; i < (int)s.size(); i += 2) {
    if (0)
      ;
    else if (s[i] == 'U')
      s[i] = 'L';
    else if (s[i] == 'L')
      s[i] = 'U';
    else if (s[i] == 'D')
      s[i] = 'R';
    else if (s[i] == 'R')
      s[i] = 'D';
  }
  return s;
}
string shiftxy(string s, int r, int c) {
  for (int i = 0; i < (int)s.size(); i += 2) {
    if (0)
      ;
    else if (s[i] == 'U')
      s[i + 1] = (s[i + 1] - '1' + c) % 6 + '1';
    else if (s[i] == 'D')
      s[i + 1] = (s[i + 1] - '1' + c) % 6 + '1';
    else if (s[i] == 'L')
      s[i + 1] = (s[i + 1] - '1' + r) % 6 + '1';
    else if (s[i] == 'R')
      s[i + 1] = (s[i + 1] - '1' + r) % 6 + '1';
  }
  return s;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  cerr.tie(nullptr);
  map<char, pair<int, int>> pos;
  auto a = ident();
  auto b = ident();
  for (auto& c : b) cin >> c;
  for (int i = 0; i < 6; i++)
    for (int j = 0; j < 6; j++) pos[a[i][j]] = {i, j};
  string sol;
  string tbs = transpose(basicswap);
  for (int rep = 0; rep < 5; rep++) {
    for (int rem = 0; rem < 6; rem++) {
      for (int i = rep; i < 6; i++) {
        for (int j = (i == rep ? rem : 0); j < 6; j++) {
          if (pos[b[i][j]].first == rep) {
            if (i == rep) {
              string mv = shiftxy(tbs, i, j);
              b = run(b, mv);
              sol += mv;
              i++;
            }
            while (j != rem) {
              string mv = shiftxy(basicswap, i, j);
              b = run(b, mv);
              sol += mv;
              j = (j + 1) % 6;
            }
            while (i > rep) {
              string mv = shiftxy(tbs, i - 1, j);
              b = run(b, mv);
              sol += mv;
              i--;
            }
            i = j = 6;
            break;
          }
        }
      }
    }
  }
  for (int i = 0; i < 6; i++) {
    for (int rep = 0; rep < 6; rep++) {
      for (int j = 0; j < 5; j++) {
        if (pos[b[i][j]].second > pos[b[i][j + 1]].second) {
          string mv = shiftxy(basicswap, i, j);
          b = run(b, mv);
          sol += mv;
        }
      }
    }
  }
  cout << sol.size() / 2 << '\n';
  for (int i = 0; i < (int)sol.size(); i += 2) cout << sol.substr(i, 2) << '\n';
}