import Control.Monad (forM_)
import Data.List (nub)

main :: IO ()
main = do
  n <- read <$> getLine :: IO Int
  xys <- map (map read.words).lines <$> getContents :: IO [[Int]]
  let arms = nub $ concat xys
      sums = map (sum.map abs) xys
      odds = length $ filter odd sums
      m = maximum sums
  if  m > 20 || odds /= n && odds /= 0
      then print $ -1
      else do
        print m
        putStrLn $ unwords $ replicate m "1"
        forM_ xys $ \[x,y] -> do
          let l = m-abs x-abs y
          putStr $ concat $ replicate (l`div`2) "LR"
          putStr $ concat $ replicate (abs x) $ if x < 0 then "L" else "R"
          putStr $ concat $ replicate (abs y) $ if y < 0 then "D" else "U"
          putStr "\n"
