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 PYTHON):

Solution:


def main():
    x=makearray([raw_input() for _ in xrange(6)])
    #x=makearray(inp2.split("\n"))
    mes=[]
    for j in xrange(6):
        for i in xrange(6):
            set(i,j,x,mes)
    #print makestr(x)
    print len(mes)
    for me in mes:
        print me

def set(i,j,x,meses):
    mes=[]
    c=FUND[i*6+j]
    ni,nj=find(c,x)
    if nj!=j:
        for _ in xrange((ni-i)%6):
            mes.append("U%s"%(nj+1))
        for k in xrange(nj-1,j-1,-1):
            pass
            mes.extend(mes2(i,k))
    else:
        for k in xrange(ni-1,i-1,-1):
            mes.extend(mes3(k,j))
    for me in mes:
        shift(me,x)
    meses.extend(mes)

def find(c,x):
    for i in xrange(6):
        for j in xrange(6):
            if x[i][j]==c:
                return i,j

FUND="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"


def makestr(x):
    m=["".join(li) for li in x]
    return "\n".join(m)

def mes2(i,j):
    meses=["L1"]+mes1(0,4)+mes1(0,3)+mes1(0,2)+2*mes1(0,0)+mes1(0,1)+mes1(0,0)+2*mes1(0,1)+2*mes1(0,3)+1*mes1(0,2)+mes1(0,3)+2*mes1(0,2)+2*mes1(0,3)+2*mes1(0,4)
    return shiftmeses(meses,i,j+2)

def mes3(i,j):
    return mes1(i,j)+mes2(i,j)

def mes1(i,j):
    return shiftmeses("L1 U1 R1 D1".split(),i,j)

def shiftmeses(li,i,j):
    return [shiftmes(mes,i,j) for mes in li]

def shiftmes(mes,i,j):
    c=mes[0]
    if c in "UD" :
        shi=j
    else:
        shi=i
    n=(int(mes[1])+(shi-1))%6+1
    return mes[0]+str(n)

def makearray(x):
    return[[c for c in s] for s in x]

def shift(mes,x):
    if mes[0] in "LR":
        di,dj=0,1
    elif mes[0] in "UD":
        di,dj=1,0
    else:
        raise""
    n=int(mes[1])-1
    g=[x[dj*n+di*k][di*n+dj*k] for k in xrange(6)]
    if mes[0] in "RD":
        c=-1
    else:
        c=1
    for k in xrange(6):
        x[dj*n+di*k][di*n+dj*k]=g[(k+c)%6]

inp="""01W345
729AB6
CD8FGH
IJELMN
OPKRST
UVQXYZ"""
inp2=inp[::-1]
main()