Problem A - HAIL CAESAR ----------------------- Romans used the following letters or pairs of letters to represent numbers: M = 1000 CM = 900 D = 500 CD = 400 C = 100 XC = 90 L = 50 XL = 40 X = 10 IX = 9 V = 5 IV = 4 I = 1 To represent a number x that does not appear in the list above, they would write x as a sum x = x_1 + x_2 + x_3 + ... + x_k where each term in the sum does appear in the list above and x_1 > x_2 > ... > x_k. They always chose a sum that contains the smallest number of terms (i.e. the minimum possible k). Then they concatenated the symbols that represent each term in the sum. Your task is to print the Roman representation of given numbers x. You may assume that 0 < x <= 2005. INPUT FORMAT ------------ The input will contain multiple instances, each on a separate line. The end of the input will be indicated by a line containing 0. OUTPUT FORMAT ------------- The output for each instance should be on a separate line. SAMPLE INPUT ------------ 362 77 1899 0 SAMPLE OUTPUT ------------- CCCLXII LXXVII MDCCCXCIX