#include "bits/stdc++.h" #define MOD 1000000007 #define INF 11234567890 #define in std::cin #define out std::cout #define rep(i,N) for(LL i=0;ilist[13]; int main() { in >> N; rep(i, N) { in >> R[i]; } list[0].first = "IV", list[0].second = 4; list[1].first = "IX", list[1].second = 9; list[2].first = "XL", list[2].second = 40; list[3].first = "XC", list[3].second = 90; list[4].first = "CD", list[4].second = 400; list[5].first = "CM", list[5].second = 900; list[6].first = "I", list[6].second = 1; list[7].first = "V", list[7].second = 5; list[8].first = "X", list[8].second = 10; list[9].first = "L", list[9].second = 50; list[10].first = "C", list[10].second = 100; list[11].first = "D", list[11].second = 500; list[12].first = "M", list[12].second = 1000; return 0; }