import Text.Printf (printf) intToBin :: Int -> String intToBin = printf "%b" computePath :: Int -> String computePath = fmap f . tail . intToBin . succ where f '0' = 'L' f '1' = 'R' f _ = error "Out of range" main :: IO () main = do _ <- getLine interact $ unlines . fmap (computePath . read) . lines