{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE BangPatterns #-} import Control.Applicative import Control.Monad import Control.Arrow import Data.List import Data.Maybe import Data.Char import qualified Data.ByteString.Char8 as B import Text.Printf readInt = ( readLn :: IO Int ) readInts = map ( read :: String -> Int ) . words <$> getLine getList = map ( fst . fromJust . B.readInt ) . B.words <$> B.getLine which a b f = if f then a else b mp [ a, b ] = ( a, b ) nums = [ "XII", "I","II","III","IIII","V","VI","VII","VIII","IX","X","XI" ] main = do [ s, t ] <- words <$> getLine let t' = read t putStrLn $ ( nums !! ) $ ( `mod` 12 ) $ ( + 12 ) $ ( `mod` 12 ) $ ( + t' ) $ fromJust $ s `elemIndex` nums