#include #include int main(void) { char w[12][5]={"I","II","III","IIII","V","VI","VII","VIII","IX","X","XI","XII"}, s1[5]; int T; scanf("%s %d", s1, &T); for (int i=0; i<12; i++) { if (strcmp(w[i], s1)==0) { printf("%s\n", w[(1008+i+T)%12]); return 0; } } }