using System; using System.Collections.Generic; using System.Linq; namespace yukicodeX { public class Program { public static string Solver(System.IO.TextReader reader) { var t = new string[] { "I", "II", "III", "IIII", "V", "VI", "VII", "VIII", "IX", "X", "XI", "XII" }; var s = reader.ReadLine().Split(); var now = Array.IndexOf( t, s[ 0 ] ) + 1; var answer = ( now + int.Parse( s[ 1 ] ) % 12 ) % 12; return t[ answer>0?answer - 1:answer+12-1 ]; } private static void Main() { Console.WriteLine( Solver( Console.In ) ); } } public class MyLib { public static string Ordinalization(int num) { string surfix = "stndrdth"; return string.Format( "{0}{1}", num, ( 0 < num % 10 && num % 10 <= 4 ) && ( ( num % 100 ) / 10 != 1 ) ? surfix.Substring( ( num % 10 - 1 ) * 2, 2 ) : surfix.Substring( 6 ) ); } public static List GetIntList(string input, char delimitor) { return input.Split( delimitor ).ToList().ConvertAll( int.Parse ); } public static List GetIntList(string input, char[] delimitors) { return input.Split( delimitors ).ToList().ConvertAll( int.Parse ); } } }