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> cmd;
class Puzzle {
  vector<string> grid;

 public:
  Puzzle() { grid.resize(6); }
  friend istream &operator>>(istream &in, Puzzle &puzzle) {
    for (int i = 0; i < 6; i++) in >> puzzle.grid[i];
    return in;
  }
  friend ostream &operator<<(ostream &out, const Puzzle &puzzle) {
    cout << "------" << endl;
    for (int i = 0; i < 6; i++) out << puzzle.grid[i] << endl;
    cout << "------" << endl;
    return out;
  }
  void find(char ch, int &r, int &c) {
    for (r = 0; r < 6; r++)
      for (c = 0; c < 6; c++)
        if (grid[r][c] == ch) return;
  }
  void move(char dir, int id) {
    string s = "";
    s += dir;
    s += (char)(id + '1');
    cmd.push_back(s);
    if (dir == 'L') {
      for (int j = 0; j < 5; j++) swap(grid[id][j], grid[id][j + 1]);
    } else if (dir == 'R') {
      for (int j = 5; j > 0; j--) swap(grid[id][j], grid[id][j - 1]);
    } else if (dir == 'U') {
      for (int i = 0; i < 5; i++) swap(grid[i][id], grid[i + 1][id]);
    } else if (dir == 'D') {
      for (int i = 5; i > 0; i--) swap(grid[i][id], grid[i - 1][id]);
    }
  }
  void move(char dir, int &r, int &c) {
    if (dir == 'R') {
      move('D', c);
      move('L', r);
      move('D', c);
      move('R', r);
      move('D', c);
      move('L', r);
      move('D', c);
      move('R', r);
      move('D', c);
      move('L', r);
      move('D', c);
      move('R', r);
      move('D', c);
      c = (c + 1) % 6;
    } else if (dir == 'L') {
      move('D', c);
      move('R', r);
      move('D', c);
      move('L', r);
      move('D', c);
      move('R', r);
      move('D', c);
      move('L', r);
      move('D', c);
      move('R', r);
      move('D', c);
      move('L', r);
      move('D', c);
      c = (c + 5) % 6;
    } else if (dir == 'U') {
      move('L', r);
      move('D', c);
      move('L', r);
      move('U', c);
      move('L', r);
      move('D', c);
      move('L', r);
      move('U', c);
      move('L', r);
      move('D', c);
      move('L', r);
      move('U', c);
      move('L', r);
      r = (r + 5) % 6;
    } else if (dir == 'D') {
      move('L', r);
      move('U', c);
      move('L', r);
      move('D', c);
      move('L', r);
      move('U', c);
      move('L', r);
      move('D', c);
      move('L', r);
      move('U', c);
      move('L', r);
      move('D', c);
      move('L', r);
      r = (r + 1) % 6;
    }
  }
};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  Puzzle puzzle;
  cin >> puzzle;
  string order = "ZYXWVUTSRQPONMLKJIHGFEDCBA9876543210";
  int gr = 5, gc = 5;
  for (int i = 0; i < 36; i++) {
    int r, c;
    puzzle.find(order[i], r, c);
    while (c < gc) puzzle.move('R', r, c);
    while (c > gc) puzzle.move('L', r, c);
    while (r < gr) puzzle.move('D', r, c);
    gc--;
    if (gc < 0) {
      gc = 5;
      gr--;
    }
  }
  cout << cmd.size() << '\n';
  for (auto s : cmd) cout << s << '\n';
  return 0;
}