import Data.Char
import Data.List
import qualified Data.ByteString.Char8 as B

main = B.interact$B.pack.unlines.f.unfoldr (B.readInt.B.dropWhile isSpace)

f (_:x:y:xys)=case chk (odd (x +y)) xys of
    Nothing -> ["-1"]
    Just(p) -> sol p (x:y:xys)

chk True [] = Just(0)
chk False [] = Just(1)
chk f (x:y:xys)
    | odd (x+y) == f = chk f xys
    | otherwise = Nothing

sol 0 xys = "31":dl:s 0 xys
sol 1 xys = "32":('1':' ':dl):map ('D':) (s 1 xys)

dl = unwords $ map (show.(2^)) [0..30]

s _ [] = []
s p (x:y:xys) = unfoldr t (31, us, vs) : s p xys
    where
        u = x+y+p
        v = x-y-p
        us = (2^31 - 1 - u)`div`2
        vs = (2^31 - 1 - v)`div`2

t (k,us,vs)
    | k==0 = Nothing
    | otherwise = Just(h us vs, (k-1,us`div`2,vs`div`2))
h us vs
    | even us && even vs = 'R'
    | even us = 'U'
    | even vs = 'D'
    | otherwise = 'L'