module Main where

import           Control.Applicative
import           Data.Monoid

main :: IO ()
main = show . oddJudge <$> getLine >>= putStrLn

evenJudge :: String -> Bool
evenJudge [] = True
evenJudge (x:xs) = (x == 'L' || x == 'U' || x == 'D') && oddJudge xs

oddJudge :: String -> Bool
oddJudge [] = True
oddJudge (x:xs) = (x == 'R' || x == 'U' || x == 'D') && evenJudge xs