#include <iostream>
using namespace std;
int main()
{
unsigned int a,i,o;
cin>>a;
o="Nr scris in cifre romane:";
b=a;
a=a%10;
i=1;
while(i<a+1)
{
o=o+"I";
i++;
}
i=1;
a=b;
a=a/10;
b=b/10;
a=a%10;
while(i<a+1)
{
o=o+"X";
i++;
}
i=1;
a=b;
a=a/10;
b=b/10;
a=a%10;
while(i<a+1)
{
o=o+"C";
i++;
}
cout<<o;
}